Merge branch 'flake' into 'master'
[xonotic/netradiant.git] / flake.nix
1 {
2   #description = "a toolset to manage and build `pk3` or `dpk` source directories";
3
4   inputs = {
5     nixpkgs.url = "flake:nixpkgs";
6   };
7
8   outputs = { self, nixpkgs }:
9     let
10       pkgs = nixpkgs.legacyPackages.x86_64-linux;
11     in {
12
13       packages.x86_64-linux.quake-tools =
14         pkgs.stdenv.mkDerivation {
15           name = "quake-tools";
16
17           src = pkgs.lib.cleanSource ./.;
18
19           cmakeFlags = [
20             "-DGIT_VERSION=nix" # meh
21             "-DDOWNLOAD_GAMEPACKS=OFF"
22             "-DBUNDLE_LIBRARIES=OFF"
23             "-DBUILD_CRUNCH=OFF"
24             "-DBUILD_DAEMONMAP=OFF"
25             "-DBUILD_RADIANT=OFF"
26             "-DBUILD_TOOLS=ON"
27             "-DFHS_INSTALL=ON"
28           ];
29
30           buildInputs = with pkgs; [
31             pkg-config gtk2 glib libwebp libxml2 minizip
32           ];
33           nativeBuildInputs = with pkgs; [
34             cmake subversion unzip
35             python3 python38Packages.pyyaml
36           ];
37
38           postInstall = "rm -r $out/share";
39         };
40
41     };
42 }