updated nix flake and package wrap
This commit is contained in:
parent
4e0acca4cc
commit
7a205c4120
|
@ -63,12 +63,5 @@
|
||||||
amlite = self.pkgs.${system}.callPackage ./pkgs/amlite inputs;
|
amlite = self.pkgs.${system}.callPackage ./pkgs/amlite inputs;
|
||||||
default = self.packages.${system}.amlite;
|
default = self.packages.${system}.amlite;
|
||||||
};
|
};
|
||||||
|
|
||||||
apps = {
|
|
||||||
amlite = {
|
|
||||||
type = "app";
|
|
||||||
program = "${self.packages.${system}.amlite}/bin/AmLite";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,17 @@
|
||||||
fetchurl,
|
fetchurl,
|
||||||
lib,
|
lib,
|
||||||
stdenv,
|
stdenv,
|
||||||
|
autoPatchelfHook,
|
||||||
|
glib,
|
||||||
|
glibcLocales,
|
||||||
|
libxcb,
|
||||||
|
freetype,
|
||||||
|
libGL,
|
||||||
|
libXrender,
|
||||||
|
libX11,
|
||||||
|
fontconfig,
|
||||||
|
qt5,
|
||||||
|
makeDesktopItem,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
@ -13,15 +24,32 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "sha256-GyA3ogtpsNA/pTIa21ha9P1YtNE0reRDTAI7VOcdxnY=";
|
sha256 = "sha256-GyA3ogtpsNA/pTIa21ha9P1YtNE0reRDTAI7VOcdxnY=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
autoPatchelfHook
|
||||||
|
glib
|
||||||
|
glibcLocales
|
||||||
|
libxcb
|
||||||
|
freetype
|
||||||
|
libGL
|
||||||
|
libXrender
|
||||||
|
libX11
|
||||||
|
fontconfig
|
||||||
|
qt5.wrapQtAppsHook
|
||||||
|
];
|
||||||
|
|
||||||
# FIX: "unpacker appears to have produced no directories"
|
# FIX: "unpacker appears to have produced no directories"
|
||||||
sourceRoot = ".";
|
sourceRoot = ".";
|
||||||
|
|
||||||
postUnpack = ''
|
postUnpack = ''
|
||||||
sed -n -e '1,/^exit 0$/!p' $sourceRoot/AmScopeAmLite.x64.sh > $sourceRoot/AmLite.tgz
|
cd $sourceRoot
|
||||||
cd $sourceRoot/
|
sed -n -e '1,/^exit 0$/!p' AmScopeAmLite.x64.sh > AmLite.tgz
|
||||||
tar -xzf AmLite.tgz
|
tar -xzf AmLite.tgz
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
preFixup = ''
|
||||||
|
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
|
||||||
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
|
@ -37,6 +65,18 @@ stdenv.mkDerivation rec {
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
desktopItems = [
|
||||||
|
(makeDesktopItem {
|
||||||
|
name = pname;
|
||||||
|
exec = "AmLite";
|
||||||
|
icon = "AmLite";
|
||||||
|
desktopName = meta.description;
|
||||||
|
genericName = meta.description;
|
||||||
|
comment = meta.description;
|
||||||
|
categories = ["Graphics" "Science" "Education"];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "AmScope AmLite";
|
description = "AmScope AmLite";
|
||||||
homepage = "https://amscope.com/";
|
homepage = "https://amscope.com/";
|
||||||
|
|
Loading…
Reference in a new issue