abuse: move to finalAttrs
explicitly use lib where needed
This commit is contained in:
parent
987fc18a12
commit
8bc206b371
@ -4,14 +4,14 @@
|
|||||||
, SDL2, SDL2_mixer, freepats
|
, SDL2, SDL2_mixer, freepats
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "abuse";
|
pname = "abuse";
|
||||||
version = "0.9.1";
|
version = "0.9.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "Xenoveritas";
|
owner = "Xenoveritas";
|
||||||
repo = pname;
|
repo = "abuse";
|
||||||
rev = "v${version}";
|
rev = "v${finalAttrs.version}";
|
||||||
hash = "sha256-eneu0HxEoM//Ju2XMHnDMZ/igeVMPSLg7IaxR2cnJrk=";
|
hash = "sha256-eneu0HxEoM//Ju2XMHnDMZ/igeVMPSLg7IaxR2cnJrk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
cp --reflink=auto -r ${data}/data/sfx ${data}/data/music data/
|
cp --reflink=auto -r ${finalAttrs.data}/data/sfx ${finalAttrs.data}/data/music data/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
desktopItems = [ (makeDesktopItem {
|
desktopItems = [ (makeDesktopItem {
|
||||||
@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
|
|||||||
substituteAll "${./abuse.sh}" $out/bin/abuse
|
substituteAll "${./abuse.sh}" $out/bin/abuse
|
||||||
chmod +x $out/bin/abuse
|
chmod +x $out/bin/abuse
|
||||||
|
|
||||||
install -Dm644 ${data}/doc/abuse.png $out/share/pixmaps/abuse.png
|
install -Dm644 ${finalAttrs.data}/doc/abuse.png $out/share/pixmaps/abuse.png
|
||||||
'';
|
'';
|
||||||
|
|
||||||
env.NIX_CFLAGS_COMPILE = "-I${lib.getDev SDL2}/include/SDL2";
|
env.NIX_CFLAGS_COMPILE = "-I${lib.getDev SDL2}/include/SDL2";
|
||||||
@ -49,16 +49,16 @@ stdenv.mkDerivation rec {
|
|||||||
nativeBuildInputs = [ copyDesktopItems cmake ];
|
nativeBuildInputs = [ copyDesktopItems cmake ];
|
||||||
buildInputs = [ SDL2 SDL2_mixer freepats ];
|
buildInputs = [ SDL2 SDL2_mixer freepats ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = {
|
||||||
description = "Side-scroller action game that pits you against ruthless alien killers";
|
description = "Side-scroller action game that pits you against ruthless alien killers";
|
||||||
homepage = "http://abuse.zoy.org/";
|
homepage = "http://abuse.zoy.org/";
|
||||||
license = with licenses; [ unfree ];
|
license = lib.licenses.unfree;
|
||||||
# Most of abuse is free (public domain, GPL2+, WTFPL), however the creator
|
# Most of abuse is free (public domain, GPL2+, WTFPL), however the creator
|
||||||
# of its sfx and music only gave Debian permission to redistribute the
|
# of its sfx and music only gave Debian permission to redistribute the
|
||||||
# files. Our friends from Debian thought about it some more:
|
# files. Our friends from Debian thought about it some more:
|
||||||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648272
|
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648272
|
||||||
maintainers = with maintainers; [ iblech ];
|
maintainers = with lib.maintainers; [ iblech ];
|
||||||
platforms = platforms.unix;
|
platforms = lib.platforms.unix;
|
||||||
broken = stdenv.isDarwin;
|
broken = stdenv.isDarwin;
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user