ref(nix): use callPackage

I didn't know it resolves lambda arguments, interesting
This commit is contained in:
Léana 江 2024-03-08 22:25:32 +01:00 committed by Léana 江
parent e90eafa667
commit b00f94996e
5 changed files with 41 additions and 40 deletions

View file

@ -1,30 +1,33 @@
{pkgs}: let
inherit (pkgs) stdenv fetchurl jre8;
in
stdenv.mkDerivation {
pname = "logisim-evolution";
version = "2023";
{
stdenv,
fetchurl,
jre8,
makeWrapper,
}:
stdenv.mkDerivation {
pname = "logisim-evolution";
version = "2023";
src = fetchurl {
url = "http://www.irisa.fr/cosi/HOMEPAGE/Derrien/logisim/logisim-evolution.jar";
sha256 = "sha256-24uXyTXhxxA1uwc787I+OJn+ZmqMgNIL9RE3zoRrWww=";
};
src = fetchurl {
url = "http://www.irisa.fr/cosi/HOMEPAGE/Derrien/logisim/logisim-evolution.jar";
sha256 = "sha256-24uXyTXhxxA1uwc787I+OJn+ZmqMgNIL9RE3zoRrWww=";
};
dontUnpack = true;
dontUnpack = true;
nativeBuildInputs = with pkgs; [makeWrapper unzip zip];
nativeBuildInputs = [makeWrapper];
installPhase = ''
runHook preInstall
installPhase = ''
runHook preInstall
mkdir -p $out/bin
makeWrapper ${jre8}/bin/java $out/bin/logisim-evolution \
--add-flags "-jar $src" \
--set _JAVA_AWT_WM_NONREPARENTING 1
mkdir -p $out/bin
makeWrapper ${jre8}/bin/java $out/bin/logisim-evolution \
--add-flags "-jar $src" \
--set _JAVA_AWT_WM_NONREPARENTING 1
runHook postInstall
'';
runHook postInstall
'';
# NOTE: related issue
# https://wiki.archlinux.org/title/java#Gray_window,_applications_not_resizing_with_WM,_menus_immediately_closing
}
# NOTE: related issue
# https://wiki.archlinux.org/title/java#Gray_window,_applications_not_resizing_with_WM,_menus_immediately_closing
}