14 , unfree_assets ? false }:
20 free_src = fetchFromGitHub {
24 sha256 = "sha256-0sww+ppctXvxMouclG3OdXpcNgrrOZJw9z8s2GhJ+IE=";
27 assets = requireFile rec {
28 name = "keeperrl_data_${version}.tar.gz";
30 This nix expression requires that the KeeperRL art assets are already
31 part of the store. These can be obtained from a purchased copy of the game
32 and found in the "data" directory. Make a tar archive of this directory
35 "tar czf ${name} data"
37 Then add this archive to the nix store with
39 "nix-prefetch-url file://\$PWD/${name}".
41 sha256 = "0115pxdzdyma2vicxgr0j21pp82gxdyrlj090s8ihp0b50f0nlll";
46 inherit pname version;
48 srcs = [ free_src ] ++ lib.optional unfree_assets assets;
50 sourceRoot = free_src.name;
52 postUnpack = lib.optionalString unfree_assets ''
57 openal curl libogg libvorbis libtheora SDL2 SDL2_image zlib clang
60 env.NIX_CFLAGS_COMPILE = toString [
61 "-I${SDL2.dev}/include/SDL2"
64 enableParallelBuilding = true;
69 "DATA_DIR=$(out)/share"
70 "ENABLE_LOCAL_USER_DIR=true"
75 install -Dm755 keeper $out/bin/keeper
76 install -Dm755 appconfig.txt $out/share/appconfig.txt
78 cp -r data_free $out/share
79 cp -r data_contrib $out/share
80 ${lib.optionalString unfree_assets "cp -r data $out/share"}
84 description = "Dungeon management rogue-like";
85 mainProgram = "keeper";
86 homepage = "https://keeperrl.com/";
87 license = licenses.gpl2Plus;
88 maintainers = with maintainers; [ onny ];
90 platforms = [ "i686-linux" "x86_64-linux" ];