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 }:
stdenv.mkDerivation rec {
name = "amoeba-${version}-${debver}";
pname = "amoeba";
version = "1.1";
debver = "29.1";

View file

@ -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 {

View file

@ -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;

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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";

View file

@ -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";
};

View file

@ -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";

View file

@ -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 ];

View file

@ -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";
};