diff --git a/pkgs/games/amoeba/default.nix b/pkgs/games/amoeba/default.nix index 61f5a5bf824d..0e21a9a1b9ea 100644 --- a/pkgs/games/amoeba/default.nix +++ b/pkgs/games/amoeba/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchurl, amoeba-data, alsa-lib, expat, freetype, gtk2, libvorbis, libGLU, xorg, pkg-config }: stdenv.mkDerivation rec { - name = "amoeba-${version}-${debver}"; + pname = "amoeba"; version = "1.1"; debver = "29.1"; diff --git a/pkgs/games/crawl/default.nix b/pkgs/games/crawl/default.nix index 02e34e5f749d..e5eea7ece628 100644 --- a/pkgs/games/crawl/default.nix +++ b/pkgs/games/crawl/default.nix @@ -7,7 +7,7 @@ }: stdenv.mkDerivation rec { - name = "crawl-${version}${lib.optionalString tileMode "-tiles"}"; + pname = "crawl${lib.optionalString tileMode "-tiles"}"; version = "0.27.1"; src = fetchFromGitHub { diff --git a/pkgs/games/dwarf-fortress/dwarf-therapist/wrapper.nix b/pkgs/games/dwarf-fortress/dwarf-therapist/wrapper.nix index 93f51df1819d..316d1308eb79 100644 --- a/pkgs/games/dwarf-fortress/dwarf-therapist/wrapper.nix +++ b/pkgs/games/dwarf-fortress/dwarf-therapist/wrapper.nix @@ -9,7 +9,8 @@ let in stdenv.mkDerivation { - name = "dwarf-therapist-${dwarf-therapist.version}"; + pname = "dwarf-therapist"; + version = dwarf-therapist.version; wrapper = substituteAll { src = ./dwarf-therapist.in; diff --git a/pkgs/games/dwarf-fortress/unfuck.nix b/pkgs/games/dwarf-fortress/unfuck.nix index 5b25cf4ff409..27b54667f0b9 100644 --- a/pkgs/games/dwarf-fortress/unfuck.nix +++ b/pkgs/games/dwarf-fortress/unfuck.nix @@ -72,7 +72,8 @@ let in stdenv.mkDerivation { - name = "dwarf_fortress_unfuck-${release.unfuckRelease}"; + pname = "dwarf_fortress_unfuck"; + version = release.unfuckRelease; src = fetchFromGitHub { owner = "svenstaro"; diff --git a/pkgs/games/dwarf-fortress/wrapper/default.nix b/pkgs/games/dwarf-fortress/wrapper/default.nix index ce989b98ffbd..3d1c3ead0604 100644 --- a/pkgs/games/dwarf-fortress/wrapper/default.nix +++ b/pkgs/games/dwarf-fortress/wrapper/default.nix @@ -92,7 +92,8 @@ let in stdenv.mkDerivation { - name = "dwarf-fortress-${dwarf-fortress.dfVersion}"; + pname = "dwarf-fortress"; + version = dwarf-fortress.dfVersion; dfInit = substituteAll { name = "dwarf-fortress-init"; diff --git a/pkgs/games/gnubg/default.nix b/pkgs/games/gnubg/default.nix index 7402049a9d82..6f50869e6c69 100644 --- a/pkgs/games/gnubg/default.nix +++ b/pkgs/games/gnubg/default.nix @@ -1,8 +1,8 @@ { lib, stdenv, fetchurl, pkg-config, glib, python3, gtk2, readline }: -let version = "1.06.002"; in -stdenv.mkDerivation { - name = "gnubg-"+version; +stdenv.mkDerivation rec { + pname = "gnubg"; + version = "1.06.002"; src = fetchurl { url = "http://gnubg.org/media/sources/gnubg-release-${version}-sources.tar.gz"; diff --git a/pkgs/games/hhexen/default.nix b/pkgs/games/hhexen/default.nix index 0306c54ef4ee..19a0b783efdd 100644 --- a/pkgs/games/hhexen/default.nix +++ b/pkgs/games/hhexen/default.nix @@ -1,7 +1,7 @@ { lib, fetchurl, SDL, stdenv }: stdenv.mkDerivation rec { - name = "hhexen"; + pname = "hhexen"; version = "1.6.3"; src = fetchurl { url = "mirror://sourceforge/hhexen/hhexen-${version}-src.tgz"; diff --git a/pkgs/games/instead/default.nix b/pkgs/games/instead/default.nix index 5c35219c19bf..cafdd2b84f0d 100644 --- a/pkgs/games/instead/default.nix +++ b/pkgs/games/instead/default.nix @@ -1,8 +1,6 @@ { lib, stdenv, fetchurl, SDL2, SDL2_ttf, SDL2_image, SDL2_mixer, pkg-config, lua, zlib, unzip }: let - version = "3.3.2"; - # I took several games at random from https://instead.syscall.ru/games/ games = [ (fetchurl { @@ -28,8 +26,9 @@ let ]; in -stdenv.mkDerivation { - name = "instead-" + version; +stdenv.mkDerivation rec { + pname = "instead"; + version = "3.3.2"; src = fetchurl { url = "mirror://sourceforge/project/instead/instead/${version}/instead_${version}.tar.gz"; diff --git a/pkgs/games/moon-buggy/default.nix b/pkgs/games/moon-buggy/default.nix index b623d7bd5396..12eb6b24a806 100644 --- a/pkgs/games/moon-buggy/default.nix +++ b/pkgs/games/moon-buggy/default.nix @@ -1,16 +1,15 @@ {lib, stdenv, fetchurl, ncurses}: stdenv.mkDerivation rec { - baseName = "moon-buggy"; + pname = "moon-buggy"; version = "1.0.51"; - name = "${baseName}-${version}"; buildInputs = [ ncurses ]; src = fetchurl { - url = "http://m.seehuhn.de/programs/${name}.tar.gz"; + url = "http://m.seehuhn.de/programs/moon-buggy-${version}.tar.gz"; sha256 = "0gyjwlpx0sd728dwwi7pwks4zfdy9rm1w1xbhwg6zip4r9nc2b9m"; }; diff --git a/pkgs/games/nethack/default.nix b/pkgs/games/nethack/default.nix index f9939f063c80..2b29bddad93c 100644 --- a/pkgs/games/nethack/default.nix +++ b/pkgs/games/nethack/default.nix @@ -20,9 +20,9 @@ let in stdenv.mkDerivation rec { version = "3.6.6"; - name = if x11Mode then "nethack-x11-${version}" - else if qtMode then "nethack-qt-${version}" - else "nethack-${version}"; + pname = if x11Mode then "nethack-x11" + else if qtMode then "nethack-qt" + else "nethack"; src = fetchurl { url = "https://nethack.org/download/${version}/nethack-${lib.replaceStrings ["."] [""] version}-src.tgz"; diff --git a/pkgs/games/planetaryannihilation/default.nix b/pkgs/games/planetaryannihilation/default.nix index c29af6d810f5..2debd15f814e 100644 --- a/pkgs/games/planetaryannihilation/default.nix +++ b/pkgs/games/planetaryannihilation/default.nix @@ -1,26 +1,15 @@ { lib, stdenv, config, fetchurl, patchelf, makeWrapper, gtk2, glib, udev, alsa-lib, atk -, nspr, fontconfig, cairo, pango, nss, freetype, gnome2, gdk-pixbuf, curl, systemd, xorg }: +, nspr, fontconfig, cairo, pango, nss, freetype, gnome2, gdk-pixbuf, curl, systemd, xorg, requireFile }: -# TODO: use dynamic attributes once Nix 1.7 is out -assert ((config.planetary_annihilation or null).url or null) != null; -assert ((config.planetary_annihilation or null).sha256 or null) != null; +stdenv.mkDerivation rec { + pname = "planetary-annihalation"; + version = "62857"; -/* to setup: - $ cat ~/.config/nixpkgs/config.nix - { - planetary_annihilation = { - url = "file:///home/user/PA_Linux_62857.tar.bz2"; + src = requireFile { + message = "This file has to be downloaded manually via nix-prefetch-url."; + name = "PA_Linux_${version}.tar.bz2"; sha256 = "0imi3k5144dsn3ka9khx3dj76klkw46ga7m6rddqjk4yslwabh3k"; }; -} -*/ - -stdenv.mkDerivation { - name = "planetary-annihalation"; - - src = fetchurl { - inherit (config.planetary_annihilation) url sha256; - }; nativeBuildInputs = [ patchelf makeWrapper ]; diff --git a/pkgs/games/xconq/default.nix b/pkgs/games/xconq/default.nix index 8f4366fbcb87..10a959a676b4 100644 --- a/pkgs/games/xconq/default.nix +++ b/pkgs/games/xconq/default.nix @@ -2,12 +2,11 @@ , libXext, fontconfig, makeWrapper }: stdenv.mkDerivation rec { - name = "${baseName}-${version}"; - baseName = "xconq"; + pname = "xconq"; version = "7.5.0-0pre.0.20050612"; src = fetchurl { - url = "mirror://sourceforge/project/${baseName}/${baseName}/${name}/${name}.tar.gz"; + url = "mirror://sourceforge/project/xconq/xconq/xconq-${version}/xconq-${version}.tar.gz"; sha256 = "1za78yx57mgwcmmi33wx3533yz1x093dnqis8q2qmqivxav51lca"; };