bandwhich: 0.23.0 -> 0.23.1; move to by-name; nixfmt; useFetchCargoVendor (#356934)
[NixPkgs.git] / pkgs / games / dwarf-fortress / dwarf-therapist / default.nix
blob1c3e05e92368d8aeb0e60218de2695ef0351092e
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , qtbase
5 , qtdeclarative
6 , cmake
7 , ninja
8 , version ? "42.1.6"
9 , hash ? "sha256-VjCXT4sl3HsFILrqTc3JJSeRedZaOXUbf4KvSzTo0uc="
12 stdenv.mkDerivation rec {
13   pname = "dwarf-therapist";
15   inherit version;
17   src = fetchFromGitHub {
18     owner = "Dwarf-Therapist";
19     repo = "Dwarf-Therapist";
20     rev = "v${version}";
21     inherit hash;
22   };
24   nativeBuildInputs = [ cmake ninja ];
25   buildInputs = [ qtbase qtdeclarative ];
27   enableParallelBuilding = true;
29   cmakeFlags = [ "-GNinja" ];
31   installPhase =
32     if stdenv.hostPlatform.isDarwin then ''
33       mkdir -p $out/Applications
34       cp -r DwarfTherapist.app $out/Applications
35     '' else null;
37   dontWrapQtApps = true;
39   meta = with lib; {
40     mainProgram = "dwarftherapist";
41     description = "Tool to manage dwarves in a running game of Dwarf Fortress";
42     maintainers = with maintainers; [ abbradar bendlas numinit ];
43     license = licenses.mit;
44     platforms = platforms.x86;
45     homepage = "https://github.com/Dwarf-Therapist/Dwarf-Therapist";
46   };