2016-04-17 01:52:35 +02:00
|
|
|
{ stdenv, fetchurl, qt4, qmake4Hook }:
|
2014-05-07 00:06:56 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "nifskope-1.1.3";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2017-09-10 10:55:58 +02:00
|
|
|
url = "https://github.com/niftools/nifskope/releases/download/${name}/${name}.tar.bz2";
|
2014-05-07 00:06:56 +02:00
|
|
|
sha256 = "0fcvrcjyvivww10sjhxamcip797b9ykbf5p3rm2k24xhkwdaqp72";
|
|
|
|
};
|
|
|
|
|
2017-09-10 10:55:58 +02:00
|
|
|
patches = [ ./gcc-6.patch ];
|
|
|
|
|
2014-05-07 00:06:56 +02:00
|
|
|
buildInputs = [ qt4 ];
|
|
|
|
|
2016-04-17 01:52:35 +02:00
|
|
|
nativeBuildInputs = [ qmake4Hook ];
|
|
|
|
|
|
|
|
preConfigure =
|
2014-05-07 00:06:56 +02:00
|
|
|
''
|
|
|
|
for i in *.cpp gl/*.cpp widgets/*.cpp; do
|
|
|
|
substituteInPlace $i --replace /usr/share/nifskope $out/share/nifskope
|
|
|
|
done
|
2016-04-17 01:52:35 +02:00
|
|
|
'';
|
2014-05-07 00:06:56 +02:00
|
|
|
|
2016-04-17 01:52:35 +02:00
|
|
|
qmakeFlags = [ "-after TARGET=nifskope" ];
|
2014-05-07 00:06:56 +02:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2016-02-26 18:38:15 +01:00
|
|
|
hardeningDisable = [ "format" ];
|
2016-02-12 14:27:00 +01:00
|
|
|
|
2014-05-07 00:06:56 +02:00
|
|
|
# Inspired by linux-install/nifskope.spec.in.
|
|
|
|
installPhase =
|
|
|
|
''
|
|
|
|
d=$out/share/nifskope
|
|
|
|
mkdir -p $out/bin $out/share/applications $out/share/pixmaps $d/{shaders,doc,lang}
|
|
|
|
cp release/nifskope $out/bin/
|
|
|
|
cp nifskope.png $out/share/pixmaps/
|
|
|
|
cp nif.xml kfm.xml style.qss $d/
|
|
|
|
cp shaders/*.frag shaders/*.prog shaders/*.vert $d/shaders/
|
|
|
|
cp doc/*.html doc/docsys.css doc/favicon.ico $d/doc/
|
|
|
|
cp lang/*.ts lang/*.tm $d/lang/
|
|
|
|
|
|
|
|
substituteInPlace nifskope.desktop \
|
|
|
|
--replace 'Exec=nifskope' "Exec=$out/bin/nifskope" \
|
|
|
|
--replace 'Icon=nifskope' "Icon=$out/share/pixmaps/nifskope.png"
|
|
|
|
cp nifskope.desktop $out/share/applications/
|
|
|
|
|
|
|
|
find $out/share -type f -exec chmod -x {} \;
|
|
|
|
''; # */
|
|
|
|
|
|
|
|
meta = {
|
2017-09-10 10:55:58 +02:00
|
|
|
homepage = https://github.com/niftools/nifskope/;
|
2014-05-07 00:06:56 +02:00
|
|
|
description = "A tool for analyzing and editing NetImmerse/Gamebryo '*.nif' files";
|
|
|
|
maintainers = [ stdenv.lib.maintainers.eelco ];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2014-06-12 09:05:12 +02:00
|
|
|
license = stdenv.lib.licenses.bsd3;
|
2014-05-07 00:06:56 +02:00
|
|
|
};
|
|
|
|
}
|