Prefer pname and version in mkDerivations instead of name (#123438)

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Co-authored-by: nixpkgs-review <nixpkgs-review@example.com>
This commit is contained in:
Samuel Ainsworth 2021-05-23 08:07:31 -07:00 committed by GitHub
parent ebd5042606
commit 02c595ebdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 49 additions and 41 deletions

View file

@ -1,10 +1,11 @@
{ lib, stdenv, fetchurl, fetchpatch, pkg-config, apacheHttpd, apr, avahi }:
stdenv.mkDerivation rec {
name = "mod_dnssd-0.6";
pname = "mod_dnssd";
version = "0.6";
src = fetchurl {
url = "http://0pointer.de/lennart/projects/mod_dnssd/${name}.tar.gz";
url = "http://0pointer.de/lennart/projects/mod_dnssd/${pname}-${version}.tar.gz";
sha256 = "2cd171d76eba398f03c1d5bcc468a1756f4801cd8ed5bd065086e4374997c5aa";
};

View file

@ -1,10 +1,11 @@
{ lib, stdenv, fetchurl, apacheHttpd, jdk }:
stdenv.mkDerivation rec {
name = "tomcat-connectors-1.2.48";
pname = "tomcat-connectors";
version = "1.2.48";
src = fetchurl {
url = "mirror://apache/tomcat/tomcat-connectors/jk/${name}-src.tar.gz";
url = "mirror://apache/tomcat/tomcat-connectors/jk/${pname}-${version}-src.tar.gz";
sha256 = "15wfj1mvad15j1fqw67qbpbpwrcz3rb0zdhrq6z2sax1l05kc6yb";
};

View file

@ -1,9 +1,10 @@
{ lib, stdenv, fetchurl, jdk }:
stdenv.mkDerivation {
name = "jboss-as-7.1.1.Final";
stdenv.mkDerivation rec {
pname = "jboss-as";
version = "7.1.1.Final";
src = fetchurl {
url = "https://download.jboss.org/jbossas/7.1/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final.tar.gz";
url = "https://download.jboss.org/jbossas/${lib.versions.majorMinor version}/jboss-as-${version}/jboss-as-${version}.tar.gz";
sha256 = "1bdjw0ib9qr498vpfbg8klqw6rl11vbz7vwn6gp1r5gpqkd3zzc8";
};

View file

@ -15,10 +15,11 @@ assert enableWebDAV -> libuuid != null;
assert enableExtendedAttrs -> attr != null;
stdenv.mkDerivation rec {
name = "lighttpd-1.4.59";
pname = "lighttpd";
version = "1.4.59";
src = fetchurl {
url = "https://download.lighttpd.net/lighttpd/releases-1.4.x/${name}.tar.xz";
url = "https://download.lighttpd.net/lighttpd/releases-${lib.versions.majorMinor version}.x/${pname}-${version}.tar.xz";
sha256 = "sha256-+5U9snPa7wjttuICVWyuij0H7tYIHJa9mQPblX0QhNU=";
};

View file

@ -1,10 +1,11 @@
{ lib, stdenv, fetchurl, boost }:
stdenv.mkDerivation rec {
name = "mini-httpd-1.7";
pname = "mini-httpd";
version = "1.7";
src = fetchurl {
url = "https://download-mirror.savannah.gnu.org/releases/mini-httpd/${name}.tar.gz";
url = "https://download-mirror.savannah.gnu.org/releases/mini-httpd/${pname}-${version}.tar.gz";
sha256 = "0jggmlaywjfbdljzv5hyiz49plnxh0har2bnc9dq4xmj1pmjgs49";
};

View file

@ -1,11 +1,11 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "clamsmtp-" + version;
pname = "clamsmtp";
version = "1.10";
src = fetchurl {
url = "http://thewalter.net/stef/software/clamsmtp/${name}.tar.gz";
url = "http://thewalter.net/stef/software/clamsmtp/${pname}-${version}.tar.gz";
sha256 = "0apr1pxifw6f1rbbsdrrwzs1dnhybg4hda3qqhqcw7p14r5xnbx5";
};

View file

@ -1,14 +1,11 @@
{ lib, stdenv, perlPackages, fetchurl }:
let
pkg = "dkimproxy";
version = "1.4.1";
in
stdenv.mkDerivation rec {
name = "${pkg}-${version}";
pname = "dkimproxy";
version = "1.4.1";
src = fetchurl {
url = "mirror://sourceforge/dkimproxy/${name}.tar.gz";
url = "mirror://sourceforge/dkimproxy/${pname}-${version}.tar.gz";
sha256 = "1gc5c7lg2qrlck7b0lvjfqr824ch6jkrzkpsn0gjvlzg7hfmld75";
};

View file

@ -18,10 +18,11 @@ let
maintenancePath = lib.makeBinPath [ gawk gnused gnugrep coreutils which ];
in stdenv.mkDerivation rec {
name = "dspam-3.10.2";
pname = "dspam";
version = "3.10.2";
src = fetchurl {
url = "mirror://sourceforge/dspam/dspam/${name}/${name}.tar.gz";
url = "mirror://sourceforge/dspam/dspam/${pname}-${version}/${pname}-${version}.tar.gz";
sha256 = "1acklnxn1wvc7abn31l3qdj8q6k13s51k5gv86vka7q20jb5cxmf";
};

View file

@ -1,10 +1,11 @@
{ lib, stdenv, fetchurl, flex, bison, sendmailPath ? "/run/wrappers/bin/sendmail" }:
stdenv.mkDerivation rec {
name = "petidomo-4.3";
pname = "petidomo";
version = "4.3";
src = fetchurl {
url = "mirror://sourceforge/petidomo/${name}.tar.gz";
url = "mirror://sourceforge/petidomo/${pname}-${version}.tar.gz";
sha256 = "0x4dbxc4fcfg1rw5ywpcypvylnzn3y4rh0m6fz4h4cdnzb8p1lvm";
};

View file

@ -1,11 +1,11 @@
{ lib, stdenv, fetchurl, openssl }:
stdenv.mkDerivation rec {
name = "popa3d-1.0.3";
pname = "popa3d";
version = "1.0.3";
src = fetchurl {
url = "http://www.openwall.com/popa3d/${name}.tar.gz";
url = "http://www.openwall.com/popa3d/${pname}-${version}.tar.gz";
sha256 = "1g48cd74sqhl496wmljhq44iyfpghaz363a1ip8nyhpjz7d57f03";
};

View file

@ -15,7 +15,8 @@ let script = writeText "script" ''
fi
''; in
stdenv.mkDerivation {
name = "system-sendmail-1.0";
pname = "system-sendmail";
version = "1.0";
src = script;

View file

@ -26,7 +26,8 @@ let
in
stdenv.mkDerivation {
name = "riak-2.2.0";
pname = "riak";
version = "2.2.0";
nativeBuildInputs = [ unzip ];
buildInputs = [

View file

@ -1,10 +1,11 @@
{ fetchurl, lib, stdenv }:
stdenv.mkDerivation rec {
name = "pies-1.3";
pname = "pies";
version = "1.3";
src = fetchurl {
url = "mirror://gnu/pies/${name}.tar.bz2";
url = "mirror://gnu/pies/${pname}-${version}.tar.bz2";
sha256 = "12r7rjjyibjdj08dvwbp0iflfpzl4s0zhn6cr6zj3hwf9gbzgl1g";
};

View file

@ -5,10 +5,11 @@ let
"-e 's/CCLIENT_SSL_ENABLE.*= false/CCLIENT_SSL_ENABLE=true/'";
in
stdenv.mkDerivation rec {
name = "prayer-1.3.5";
pname = "prayer";
version = "1.3.5";
src = fetchurl {
url = "ftp://ftp.csx.cam.ac.uk/pub/software/email/prayer/${name}.tar.gz";
url = "ftp://ftp.csx.cam.ac.uk/pub/software/email/prayer/${pname}-${version}.tar.gz";
sha256 = "135fjbxjn385b6cjys6qhbwfw61mdcl2akkll4jfpdzfvhbxlyda";
};

View file

@ -1,10 +1,11 @@
{ fetchurl, lib, stdenv, flex, bison }:
stdenv.mkDerivation rec {
name = "unfs3-0.9.22";
pname = "unfs3";
version = "0.9.22";
src = fetchurl {
url = "mirror://sourceforge/unfs3/${name}.tar.gz";
url = "mirror://sourceforge/unfs3/${pname}-${version}.tar.gz";
sha256 = "076zkyqkn56q0a8n3h65n1a68fknk4hrrp6mbhajq5s1wp5248j8";
};

View file

@ -1,11 +1,11 @@
{ lib, stdenv, fetchurl, cmake, zeromq, cppzmq }:
stdenv.mkDerivation {
name = "ursadb";
stdenv.mkDerivation rec {
pname = "ursadb";
version = "1.2.0";
src = fetchurl {
url = "https://github.com/CERT-Polska/ursadb/archive/v1.2.0.tar.gz";
url = "https://github.com/CERT-Polska/ursadb/archive/v${version}.tar.gz";
sha256 = "10dax3mswq0x4cfrpi31b7ii7bxl536wz1j11b7f5c0zw9pjxzym";
};

View file

@ -847,13 +847,12 @@ let self = dotnetPackages // overrides; dotnetPackages = with self; {
# };
NDeskOptions = stdenv.mkDerivation rec {
baseName = "NDesk.Options";
pname = "NDesk.Options";
version = "0.2.1";
name = "${baseName}-${version}";
src = fetchurl {
name = "${baseName}-${version}.tar.gz";
url = "http://www.ndesk.org/archive/ndesk-options/ndesk-options-0.2.1.tar.gz";
name = "${pname}-${version}.tar.gz";
url = "http://www.ndesk.org/archive/ndesk-options/ndesk-options-${version}.tar.gz";
sha256 = "1y25bfapafwmifakjzyb9c70qqpvza8g5j2jpf08j8wwzkrb6r28";
};