helm/packages/lmms.nix
Henrik Lissner 96ffd97ac6
Replace modules/audio/* with daw module
And add custom lmms package, since the upstream is currently
broken (NixOS/nixpkgs#76074).
2020-01-04 00:07:20 -05:00

43 lines
1.4 KiB
Nix

{ appimageTools, fetchurl, lib, gsettings-desktop-schemas, gtk3, makeDesktopItem }:
let pname = "lmms";
version = "1.2.1";
desktopItem = makeDesktopItem {
name = pname;
desktopName = "LMMS";
comment = "Cross-platform music production software";
icon = "lmms";
terminal = "false";
exec = pname;
categories = "Audio";
};
in appimageTools.wrapType2 rec {
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/LMMS/lmms/releases/download/v${version}/${name}-linux-x86_64.AppImage";
sha256 = "0aa63c3fv84wrny7vp7ycdvapp21j09kllzs1xybb19wdkdd863v";
};
profile = ''
export LC_ALL=C.UTF-8
export XDG_DATA_DIRS=${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS
'';
extraPkgs = p: (appimageTools.defaultFhsEnvArgs.multiPkgs p);
extraInstallCommands = ''
mv $out/bin/{${name},${pname}}
chmod +x $out/bin/${pname}
mkdir -p "$out/share/applications/"
cp "${desktopItem}"/share/applications/* "$out/share/applications/"
substituteInPlace $out/share/applications/*.desktop --subst-var out
'';
meta = with lib; {
description = "Cross-platform music production software";
homepage = https://lmms.io;
license = licenses.gpl2Plus;
platforms = [ "x86_64-linux" "i686-linux" ];
maintainers = with maintainers; [ hlissner ];
};
}