treewide: rename name to pname&version

This commit is contained in:
Felix Buehler 2022-01-11 13:50:16 +01:00
parent 1ea75adb02
commit 4a403f9e33
12 changed files with 29 additions and 40 deletions

View file

@ -1,7 +1,7 @@
{ lib, stdenv, fetchurl, amoeba-data, alsa-lib, expat, freetype, gtk2, libvorbis, libGLU, xorg, pkg-config }: { lib, stdenv, fetchurl, amoeba-data, alsa-lib, expat, freetype, gtk2, libvorbis, libGLU, xorg, pkg-config }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "amoeba-${version}-${debver}"; pname = "amoeba";
version = "1.1"; version = "1.1";
debver = "29.1"; debver = "29.1";

View file

@ -7,7 +7,7 @@
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "crawl-${version}${lib.optionalString tileMode "-tiles"}"; pname = "crawl${lib.optionalString tileMode "-tiles"}";
version = "0.27.1"; version = "0.27.1";
src = fetchFromGitHub { src = fetchFromGitHub {

View file

@ -9,7 +9,8 @@ let
in in
stdenv.mkDerivation { stdenv.mkDerivation {
name = "dwarf-therapist-${dwarf-therapist.version}"; pname = "dwarf-therapist";
version = dwarf-therapist.version;
wrapper = substituteAll { wrapper = substituteAll {
src = ./dwarf-therapist.in; src = ./dwarf-therapist.in;

View file

@ -72,7 +72,8 @@ let
in in
stdenv.mkDerivation { stdenv.mkDerivation {
name = "dwarf_fortress_unfuck-${release.unfuckRelease}"; pname = "dwarf_fortress_unfuck";
version = release.unfuckRelease;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "svenstaro"; owner = "svenstaro";

View file

@ -92,7 +92,8 @@ let
in in
stdenv.mkDerivation { stdenv.mkDerivation {
name = "dwarf-fortress-${dwarf-fortress.dfVersion}"; pname = "dwarf-fortress";
version = dwarf-fortress.dfVersion;
dfInit = substituteAll { dfInit = substituteAll {
name = "dwarf-fortress-init"; name = "dwarf-fortress-init";

View file

@ -1,8 +1,8 @@
{ lib, stdenv, fetchurl, pkg-config, glib, python3, gtk2, readline }: { lib, stdenv, fetchurl, pkg-config, glib, python3, gtk2, readline }:
let version = "1.06.002"; in stdenv.mkDerivation rec {
stdenv.mkDerivation { pname = "gnubg";
name = "gnubg-"+version; version = "1.06.002";
src = fetchurl { src = fetchurl {
url = "http://gnubg.org/media/sources/gnubg-release-${version}-sources.tar.gz"; url = "http://gnubg.org/media/sources/gnubg-release-${version}-sources.tar.gz";

View file

@ -1,7 +1,7 @@
{ lib, fetchurl, SDL, stdenv }: { lib, fetchurl, SDL, stdenv }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "hhexen"; pname = "hhexen";
version = "1.6.3"; version = "1.6.3";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/hhexen/hhexen-${version}-src.tgz"; url = "mirror://sourceforge/hhexen/hhexen-${version}-src.tgz";

View file

@ -1,8 +1,6 @@
{ lib, stdenv, fetchurl, SDL2, SDL2_ttf, SDL2_image, SDL2_mixer, pkg-config, lua, zlib, unzip }: { lib, stdenv, fetchurl, SDL2, SDL2_ttf, SDL2_image, SDL2_mixer, pkg-config, lua, zlib, unzip }:
let let
version = "3.3.2";
# I took several games at random from https://instead.syscall.ru/games/ # I took several games at random from https://instead.syscall.ru/games/
games = [ games = [
(fetchurl { (fetchurl {
@ -28,8 +26,9 @@ let
]; ];
in in
stdenv.mkDerivation { stdenv.mkDerivation rec {
name = "instead-" + version; pname = "instead";
version = "3.3.2";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/project/instead/instead/${version}/instead_${version}.tar.gz"; url = "mirror://sourceforge/project/instead/instead/${version}/instead_${version}.tar.gz";

View file

@ -1,16 +1,15 @@
{lib, stdenv, fetchurl, ncurses}: {lib, stdenv, fetchurl, ncurses}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
baseName = "moon-buggy"; pname = "moon-buggy";
version = "1.0.51"; version = "1.0.51";
name = "${baseName}-${version}";
buildInputs = [ buildInputs = [
ncurses ncurses
]; ];
src = fetchurl { src = fetchurl {
url = "http://m.seehuhn.de/programs/${name}.tar.gz"; url = "http://m.seehuhn.de/programs/moon-buggy-${version}.tar.gz";
sha256 = "0gyjwlpx0sd728dwwi7pwks4zfdy9rm1w1xbhwg6zip4r9nc2b9m"; sha256 = "0gyjwlpx0sd728dwwi7pwks4zfdy9rm1w1xbhwg6zip4r9nc2b9m";
}; };

View file

@ -20,9 +20,9 @@ let
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
version = "3.6.6"; version = "3.6.6";
name = if x11Mode then "nethack-x11-${version}" pname = if x11Mode then "nethack-x11"
else if qtMode then "nethack-qt-${version}" else if qtMode then "nethack-qt"
else "nethack-${version}"; else "nethack";
src = fetchurl { src = fetchurl {
url = "https://nethack.org/download/${version}/nethack-${lib.replaceStrings ["."] [""] version}-src.tgz"; url = "https://nethack.org/download/${version}/nethack-${lib.replaceStrings ["."] [""] version}-src.tgz";

View file

@ -1,26 +1,15 @@
{ lib, stdenv, config, fetchurl, patchelf, makeWrapper, gtk2, glib, udev, alsa-lib, atk { 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 stdenv.mkDerivation rec {
assert ((config.planetary_annihilation or null).url or null) != null; pname = "planetary-annihalation";
assert ((config.planetary_annihilation or null).sha256 or null) != null; version = "62857";
/* to setup: src = requireFile {
$ cat ~/.config/nixpkgs/config.nix message = "This file has to be downloaded manually via nix-prefetch-url.";
{ name = "PA_Linux_${version}.tar.bz2";
planetary_annihilation = {
url = "file:///home/user/PA_Linux_62857.tar.bz2";
sha256 = "0imi3k5144dsn3ka9khx3dj76klkw46ga7m6rddqjk4yslwabh3k"; sha256 = "0imi3k5144dsn3ka9khx3dj76klkw46ga7m6rddqjk4yslwabh3k";
}; };
}
*/
stdenv.mkDerivation {
name = "planetary-annihalation";
src = fetchurl {
inherit (config.planetary_annihilation) url sha256;
};
nativeBuildInputs = [ patchelf makeWrapper ]; nativeBuildInputs = [ patchelf makeWrapper ];

View file

@ -2,12 +2,11 @@
, libXext, fontconfig, makeWrapper }: , libXext, fontconfig, makeWrapper }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "${baseName}-${version}"; pname = "xconq";
baseName = "xconq";
version = "7.5.0-0pre.0.20050612"; version = "7.5.0-0pre.0.20050612";
src = fetchurl { 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"; sha256 = "1za78yx57mgwcmmi33wx3533yz1x093dnqis8q2qmqivxav51lca";
}; };