samrewritten: 2.0 -> 2.1

This commit is contained in:
xeals 2021-01-04 12:23:50 +11:00
parent b46e60ddec
commit c0fb93b48b
Signed by: xeals
GPG Key ID: A498C7AF27EC6B5C

View File

@ -13,13 +13,13 @@
stdenv.mkDerivation rec {
pname = "SamRewritten";
version = "2.0";
version = "2.1";
src = fetchFromGitHub {
owner = "PaulCombal";
repo = pname;
rev = "202005";
sha256 = "0zcb6cmzk4fvbf0rkyyfvlnh9mhi0wz89parprkz6vxrj65ph1f6";
rev = "202008";
sha256 = "ab7903b997675b0d4d7eede15430fc5ca2736e6c25c7f95a7c97e1ce25582a1c";
};
nativeBuildInputs = [ gnumake pkg-config ];
@ -33,21 +33,10 @@ stdenv.mkDerivation rec {
NIX_CFLAGS_LINK = "-pthread";
# FIXME: Use `make install` after the next release
# FIXME: Get `substituteInPlace` working
installPhase = ''
mkdir -p $out/lib/SamRewritten/{bin,glade,assets}
mkdir -p $out/share/icons/hicolor/{64x64,256x256}/apps
mkdir -p $out/share/applications
mkdir -p $out/bin
cp bin/launch.sh bin/samrewritten bin/libsteam_api.so $out/lib/SamRewritten/bin/
ln -s $out/lib/SamRewritten/bin/launch.sh $out/bin/samrewritten
cp glade/main_window.glade $out/lib/SamRewritten/glade/main_window.glade
cp assets/icon_64.png $out/share/icons/hicolor/64x64/apps/samrewritten.png
cp assets/icon_256.png $out/share/icons/hicolor/256x256/apps/samrewritten.png
cp assets/icon_256.png $out/lib/SamRewritten/assets/
makeFlags = [ "PREFIX=$(out)" ];
substitute package/samrewritten.desktop $out/share/applications/samrewritten.desktop \
postFixup = ''
substituteInPlace $out/share/applications/samrewritten.desktop \
--replace /usr/bin/samrewritten $out/bin/samrewritten
'';