From c5451206ab3d2b2e4442b9e59e6b1fd978a9d57f Mon Sep 17 00:00:00 2001 From: Svein Ove Aas Date: Wed, 4 May 2016 02:12:39 +0100 Subject: [PATCH] Init CKAN: The Comprehensive Kerbal Archive Network (#15202) * ckan: Init at 1.16.1 --- pkgs/games/ckan/default.nix | 42 +++++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 44 insertions(+) create mode 100644 pkgs/games/ckan/default.nix diff --git a/pkgs/games/ckan/default.nix b/pkgs/games/ckan/default.nix new file mode 100644 index 000000000000..1465a65a2bd9 --- /dev/null +++ b/pkgs/games/ckan/default.nix @@ -0,0 +1,42 @@ +{ stdenv, fetchFromGitHub, makeWrapper, perl, mono, gtk }: + +stdenv.mkDerivation rec { + name = "ckan-${version}"; + version = "1.16.1"; + + src = fetchFromGitHub { + owner = "KSP-CKAN"; + repo = "CKAN"; + rev = "v${version}"; + sha256 = "0lfvl8w09lakz35szp5grfvhq8xx486f5igvj1m6azsql4n929lg"; + }; + + buildInputs = [ makeWrapper perl mono gtk ]; + + postPatch = '' + substituteInPlace bin/build \ + --replace /usr/bin/perl ${perl}/bin/perl + ''; + + # Tests don't currently work, as they try to write into /var/empty. + doCheck = false; + checkTarget = "test"; + + installPhase = '' + mkdir -p $out/bin + for exe in *.exe; do + install -m 0644 $exe $out/bin + makeWrapper ${mono}/bin/mono $out/bin/$(basename $exe .exe) \ + --add-flags $out/bin/$exe \ + --set LD_LIBRARY_PATH ${gtk.out}/lib + done + ''; + + meta = { + description = "Mod manager for Kerbal Space Program"; + homepage = https://github.com/KSP-CKAN/CKAN; + license = stdenv.lib.licenses.mit; + maintainers = [ stdenv.lib.maintainers.Baughn ]; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5f901adb856c..685f1441b1d7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14805,6 +14805,8 @@ in chocolateDoom = callPackage ../games/chocolate-doom { }; + ckan = callPackage ../games/ckan { }; + cockatrice = qt5.callPackage ../games/cockatrice { }; confd = goPackages.confd.bin // { outputs = [ "bin" ]; };