diff --git a/pkgs/by-name/ch/cheesecutter/package.nix b/pkgs/by-name/ch/cheesecutter/package.nix index 36b59414cdcd..88b64568da1d 100644 --- a/pkgs/by-name/ch/cheesecutter/package.nix +++ b/pkgs/by-name/ch/cheesecutter/package.nix @@ -9,13 +9,13 @@ }: stdenv.mkDerivation { pname = "cheesecutter"; - version = "unstable-2021-02-27"; + version = "2.9-beta-3-unstable-2021-02-27"; src = fetchFromGitHub { owner = "theyamo"; repo = "CheeseCutter"; rev = "84450d3614b8fb2cabda87033baab7bedd5a5c98"; - sha256 = "sha256:0q4a791nayya6n01l0f4kk497rdq6kiq0n72fqdpwqy138pfwydn"; + hash = "sha256-tnnuLhrBY34bduJYgOM0uOWTyJzEARqANcp7ZUM6imA="; }; patches = [ @@ -24,19 +24,29 @@ stdenv.mkDerivation { ./0001-Drop-baked-in-build-date-for-r13y.patch ] - ++ lib.optional stdenv.hostPlatform.isDarwin ./0002-Prepend-libSDL.dylib-to-macOS-SDL-loader.patch; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + ./0002-Prepend-libSDL.dylib-to-macOS-SDL-loader.patch + ]; + + strictDeps = true; nativeBuildInputs = [ acme ldc ] - ++ lib.optional (!stdenv.hostPlatform.isDarwin) patchelf; + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ + patchelf + ]; buildInputs = [ SDL ]; + enableParallelBuilding = true; + makefile = "Makefile.ldc"; installPhase = '' + runHook preInstall + for exe in {ccutter,ct2util}; do install -D $exe $out/bin/$exe done @@ -48,6 +58,8 @@ stdenv.mkDerivation { for res in $(ls icons | sed -e 's/cc//g' -e 's/.png//g'); do install -Dm444 icons/cc$res.png $out/share/icons/hicolor/''${res}x''${res}/apps/cheesecutter.png done + + runHook postInstall ''; postFixup = @@ -74,5 +86,6 @@ stdenv.mkDerivation { "x86_64-darwin" ]; maintainers = with lib.maintainers; [ OPNA2608 ]; + mainProgram = "ccutter"; }; }