2016-09-11 21:24:51 +00:00
|
|
|
{ stdenv, fetchFromGitHub, makeWrapper, perl, mono, gtk2, curl }:
|
2016-05-04 01:12:39 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "ckan";
|
2016-05-04 01:12:39 +00:00
|
|
|
version = "1.16.1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "KSP-CKAN";
|
|
|
|
repo = "CKAN";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0lfvl8w09lakz35szp5grfvhq8xx486f5igvj1m6azsql4n929lg";
|
|
|
|
};
|
|
|
|
|
2016-05-06 16:57:11 +00:00
|
|
|
buildInputs = [ makeWrapper perl mono ];
|
2016-05-04 01:12:39 +00:00
|
|
|
|
|
|
|
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";
|
|
|
|
|
2016-09-11 21:24:51 +00:00
|
|
|
libraries = stdenv.lib.makeLibraryPath [ gtk2 curl ];
|
2016-05-06 16:57:11 +00:00
|
|
|
|
2016-05-04 01:12:39 +00:00
|
|
|
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 \
|
2016-05-06 16:57:11 +00:00
|
|
|
--set LD_LIBRARY_PATH $libraries
|
2016-05-04 01:12:39 +00:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Mod manager for Kerbal Space Program";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/KSP-CKAN/CKAN";
|
2016-05-04 01:12:39 +00:00
|
|
|
license = stdenv.lib.licenses.mit;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.Baughn ];
|
|
|
|
platforms = stdenv.lib.platforms.all;
|
|
|
|
};
|
|
|
|
}
|