Merge pull request #49769 from Synthetica9/implement-rfc0035-II

[WIP] Implement RFC0035 II: Electric Boogaloo
This commit is contained in:
Jörg Thalheim 2018-11-06 15:27:06 +00:00 committed by GitHub
commit 424c38b92a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
61 changed files with 129 additions and 96 deletions

View File

@ -236,6 +236,26 @@ rec {
in lenContent >= lenSuffix && in lenContent >= lenSuffix &&
substring (lenContent - lenSuffix) lenContent content == suffix; substring (lenContent - lenSuffix) lenContent content == suffix;
/* Determine whether a string contains the given infix
Type: hasInfix :: string -> string -> bool
Example:
hasInfix "bc" "abcd"
=> true
hasInfix "ab" "abcd"
=> true
hasInfix "cd" "abcd"
=> true
hasInfix "foo" "abcd"
=> false
*/
hasInfix = infix: content:
let
drop = x: substring 1 (stringLength x) x;
in hasPrefix infix content
|| content != "" && hasInfix infix (drop content);
/* Convert a string to a list of characters (i.e. singleton strings). /* Convert a string to a list of characters (i.e. singleton strings).
This allows you to, e.g., map a function over each character. However, This allows you to, e.g., map a function over each character. However,
note that this will likely be horribly inefficient; Nix is not a note that this will likely be horribly inefficient; Nix is not a

View File

@ -2,7 +2,7 @@
let let
version = "0.11.1"; version = "0.11.1";
name = "mist"; pname = "mist";
throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}"; throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}";
@ -26,7 +26,7 @@ let
}; };
mist = stdenv.lib.appendToName "unwrapped" (stdenv.mkDerivation { mist = stdenv.lib.appendToName "unwrapped" (stdenv.mkDerivation {
inherit name version meta; inherit pname version meta;
src = { src = {
i686-linux = fetchurl { i686-linux = fetchurl {

View File

@ -10,7 +10,7 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "0.9.0"; version = "0.9.0";
name = "cadence"; pname = "cadence";
src = fetchurl { src = fetchurl {
url = "https://github.com/falkTX/Cadence/archive/v${version}.tar.gz"; url = "https://github.com/falkTX/Cadence/archive/v${version}.tar.gz";

View File

@ -3,8 +3,9 @@
, libzip, rtaudio, rtmidi, speex }: , libzip, rtaudio, rtmidi, speex }:
let let
glfw-git = glfw.overrideAttrs (oldAttrs: { glfw-git = glfw.overrideAttrs (oldAttrs: rec {
name = "glfw-git-20180529"; name = "glfw-git-${version}";
version = "unstable-2018-05-29";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "glfw"; owner = "glfw";
repo = "glfw"; repo = "glfw";

View File

@ -6,7 +6,7 @@
}: }:
python3Packages.buildPythonApplication rec { python3Packages.buildPythonApplication rec {
name = "vimiv"; pname = "vimiv";
version = "0.7.3"; version = "0.7.3";
src = fetchFromGitHub { src = fetchFromGitHub {

View File

@ -28,6 +28,7 @@ stdenv.mkDerivation rec {
let let
mupdf_modded = mupdf.overrideAttrs (attrs: { mupdf_modded = mupdf.overrideAttrs (attrs: {
name = "mupdf-1.10a"; name = "mupdf-1.10a";
version = "1.10a";
src = fetchurl { src = fetchurl {
url = "https://mupdf.com/downloads/archive/mupdf-1.10a-source.tar.gz"; url = "https://mupdf.com/downloads/archive/mupdf-1.10a-source.tar.gz";
sha256 = "0dm8wcs8i29aibzkqkrn8kcnk4q0kd1v66pg48h5c3qqp4v1zk5a"; sha256 = "0dm8wcs8i29aibzkqkrn8kcnk4q0kd1v66pg48h5c3qqp4v1zk5a";

View File

@ -2,7 +2,7 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "4.1.5.2"; version = "4.1.5.2";
name = "omegat"; pname = "omegat";
src = fetchurl { # their zip has repeated files or something, so no fetchzip src = fetchurl { # their zip has repeated files or something, so no fetchzip
url = mirror://sourceforge/project/omegat/OmegaT%20-%20Latest/OmegaT%204.1.5%20update%202/OmegaT_4.1.5_02_Beta_Without_JRE.zip; url = mirror://sourceforge/project/omegat/OmegaT%20-%20Latest/OmegaT%204.1.5%20update%202/OmegaT_4.1.5_02_Beta_Without_JRE.zip;

View File

@ -1,11 +1,11 @@
{ stdenv, fetchurl, xorg, xlibsWrapper }: { stdenv, fetchurl, xorg, xlibsWrapper }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "1.2.sakura.5"; version_name = "1.2.sakura.5";
vname = "1.2.5"; version = "1.2.5";
name = "oneko-${vname}"; name = "oneko-${version}";
src = fetchurl { src = fetchurl {
url = "http://www.daidouji.com/oneko/distfiles/oneko-${version}.tar.gz"; url = "http://www.daidouji.com/oneko/distfiles/oneko-${version_name}.tar.gz";
sha256 = "2c2e05f1241e9b76f54475b5577cd4fb6670de058218d04a741a04ebd4a2b22f"; sha256 = "2c2e05f1241e9b76f54475b5577cd4fb6670de058218d04a741a04ebd4a2b22f";
}; };
buildInputs = [ xorg.imake xorg.gccmakedep xlibsWrapper ]; buildInputs = [ xorg.imake xorg.gccmakedep xlibsWrapper ];

View File

@ -69,7 +69,7 @@ let rpath = lib.makeLibraryPath [
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
name = "brave"; pname = "brave";
version = "0.25.2"; version = "0.25.2";
src = fetchurl { src = fetchurl {

View File

@ -1,8 +1,8 @@
{ stdenv, fetchurl, fetchpatch }: { stdenv, fetchurl, fetchpatch }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "dnh3.3.2"; version = "3.3.2";
name = "enhanced-ctorrent"; pname = "enhanced-ctorrent-dhn";
src = fetchurl { src = fetchurl {
url = "http://www.rahul.net/dholmes/ctorrent/ctorrent-dnh3.3.2.tar.gz"; url = "http://www.rahul.net/dholmes/ctorrent/ctorrent-dnh3.3.2.tar.gz";

View File

@ -2,8 +2,8 @@
, curl, pkgconfig }: , curl, pkgconfig }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "http-getter"; pname = "http-getter";
version = "20180606"; version = "unstable-2018-06-06";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "tohojo"; owner = "tohojo";

View File

@ -9,12 +9,11 @@ let
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "salut-a-toi-${version}"; pname = "salut-a-toi";
version = "0.6.1"; version = "0.6.1";
pname = "sat-${version}";
src = fetchurl { src = fetchurl {
url = "ftp://ftp.goffi.org/sat/${pname}.tar.bz2"; url = "ftp://ftp.goffi.org/sat/sat-${version}.tar.bz2";
sha256 = "0kn9403n8fpzl0hsb9kkzicsmzq2fjl627l31yykbqzc4nsr780d"; sha256 = "0kn9403n8fpzl0hsb9kkzicsmzq2fjl627l31yykbqzc4nsr780d";
}; };

View File

@ -12,7 +12,7 @@
with stdenv.lib; with stdenv.lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "remmina-${version}"; pname = "remmina";
version = "1.2.32"; version = "1.2.32";
src = fetchFromGitLab { src = fetchFromGitLab {

View File

@ -3,14 +3,12 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "bookworm"; pname = "bookworm";
version = "4f7b118281667d22f1b3205edf0b775341fa49cb"; version = "unstable-2018-10-21";
name = "${pname}-2018-10-21";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "babluboy"; owner = "babluboy";
repo = pname; repo = pname;
rev = version; rev = "4f7b118281667d22f1b3205edf0b775341fa49cb";
sha256 = "0bcyim87zk4b4xmgfs158lnds3y8jg7ppzw54kjpc9rh66fpn3b9"; sha256 = "0bcyim87zk4b4xmgfs158lnds3y8jg7ppzw54kjpc9rh66fpn3b9";
}; };

View File

@ -3,6 +3,7 @@
let let
#xhtml2pdf specifically requires version "1.0b10" of html5lib #xhtml2pdf specifically requires version "1.0b10" of html5lib
html5 = html5lib.overrideAttrs( oldAttrs: rec{ html5 = html5lib.overrideAttrs( oldAttrs: rec{
name = "${oldAttrs.pname}-${version}";
version = "1.0b10"; version = "1.0b10";
src = oldAttrs.src.override { src = oldAttrs.src.override {
inherit version; inherit version;

View File

@ -16,7 +16,8 @@ rec {
} : } :
let let
docker-runc = runc.overrideAttrs (oldAttrs: rec { docker-runc = runc.overrideAttrs (oldAttrs: rec {
name = "docker-runc"; name = "docker-runc-${version}";
inherit version;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "docker"; owner = "docker";
repo = "runc"; repo = "runc";
@ -28,7 +29,8 @@ rec {
}); });
docker-containerd = (containerd.override { inherit go; }).overrideAttrs (oldAttrs: rec { docker-containerd = (containerd.override { inherit go; }).overrideAttrs (oldAttrs: rec {
name = "docker-containerd"; name = "docker-containerd-${version}";
inherit version;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "docker"; owner = "docker";
repo = "containerd"; repo = "containerd";
@ -42,7 +44,8 @@ rec {
}); });
docker-tini = tini.overrideAttrs (oldAttrs: rec { docker-tini = tini.overrideAttrs (oldAttrs: rec {
name = "docker-init"; name = "docker-init-${version}";
inherit version;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "krallin"; owner = "krallin";
repo = "tini"; repo = "tini";

View File

@ -8,7 +8,7 @@ if md5 != "" then
throw "fetchegg does not support md5 anymore, please use sha256" throw "fetchegg does not support md5 anymore, please use sha256"
else else
stdenvNoCC.mkDerivation { stdenvNoCC.mkDerivation {
name = "chicken-${name}-export"; name = "chicken-${name}-export-${version}";
builder = ./builder.sh; builder = ./builder.sh;
nativeBuildInputs = [ chicken ]; nativeBuildInputs = [ chicken ];

View File

@ -1,9 +1,9 @@
{stdenv, writeText, fetchFromGitHub }: {stdenv, writeText, fetchFromGitHub }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "hex-registry"; pname = "hex-registry";
rev = "11d7a24e9f53f52490ce255a6248e71128e73aa1"; rev = "11d7a24e9f53f52490ce255a6248e71128e73aa1";
version = "20180712.${rev}"; version = "unstable-2018-07-12";
src = fetchFromGitHub { src = fetchFromGitHub {
inherit rev; inherit rev;

View File

@ -7,13 +7,13 @@ let
}; };
pkg = self: stdenv.mkDerivation rec { pkg = self: stdenv.mkDerivation rec {
name = "hex"; pname = "hex";
version = "v0.17.1"; version = "0.17.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "hexpm"; owner = "hexpm";
repo = "hex"; repo = "hex";
rev = "${version}"; rev = "v${version}";
sha256 = "1s4asar1mcavzj3w37jcz243ka0z5jm0r42yws3h4aagawxxg02z"; sha256 = "1s4asar1mcavzj3w37jcz243ka0z5jm0r42yws3h4aagawxxg02z";
}; };

View File

@ -65,7 +65,7 @@ in rec {
mx = stdenv.mkDerivation rec { mx = stdenv.mkDerivation rec {
version = "5.192.0"; version = "5.192.0";
name = "mx"; pname = "mx";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "graalvm"; owner = "graalvm";
repo = "mx"; repo = "mx";

View File

@ -12,7 +12,7 @@ let
in in
stdenvNoCC.mkDerivation { stdenvNoCC.mkDerivation {
name = "elf-header"; pname = "elf-header";
inherit (libc) version; inherit (libc) version;
src = null; src = null;

View File

@ -6,16 +6,15 @@
let let
unwrapped = stdenv.mkDerivation rec { unwrapped = stdenv.mkDerivation rec {
pname = "gsignond"; pname = "gsignond";
version = "39022c86ddb5062a10fb0503ad9d81a8e532d527"; version = "unstable-2018-10-04";
name = "${pname}-2018-10-04";
outputs = [ "out" "dev" "devdoc" ]; outputs = [ "out" "dev" "devdoc" ];
src = fetchFromGitLab { src = fetchFromGitLab {
owner = "accounts-sso"; owner = "accounts-sso";
repo = pname; repo = pname;
rev = version; rev = "39022c86ddb5062a10fb0503ad9d81a8e532d527";
sha256 = "1gw8vbj3j6wxqy759z97arm8lnqhmraw9s2frv3ar6crnfhlidff"; sha256 = "1gw8vbj3j6wxqy759z97arm8lnqhmraw9s2frv3ar6crnfhlidff";
}; };

View File

@ -3,12 +3,12 @@
flex, yacc, zlib, libxml2 }: flex, yacc, zlib, libxml2 }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "igraph"; pname = "igraph";
version = "0.7.1"; version = "0.7.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "igraph"; owner = "igraph";
repo = name; repo = pname;
rev = version; rev = version;
sha256 = "1wsy0r511gk069il6iqjs27q8cjvqz20gf0a7inybx1bw84845z8"; sha256 = "1wsy0r511gk069il6iqjs27q8cjvqz20gf0a7inybx1bw84845z8";
}; };

View File

@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, cmake, openssl }: { stdenv, fetchFromGitHub, cmake, openssl }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "libsignal-protocol-c"; pname = "libsignal-protocol-c";
version = "2.3.2"; version = "2.3.2";
src = fetchFromGitHub { src = fetchFromGitHub {

View File

@ -2,15 +2,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libsignon-glib"; pname = "libsignon-glib";
version = "3639a2e90447e4640a03a44972560afe8f61aa48"; version = "unstable-2018-10-24";
name = "${pname}-2018-10-24";
outputs = [ "out" "dev" "devdoc" "py" ]; outputs = [ "out" "dev" "devdoc" "py" ];
src = fetchgit { src = fetchgit {
url = "https://gitlab.com/accounts-sso/${pname}"; url = "https://gitlab.com/accounts-sso/${pname}";
rev = version; rev = "3639a2e90447e4640a03a44972560afe8f61aa48";
fetchSubmodules = true; fetchSubmodules = true;
sha256 = "1cq19zbsx4c57dc5gp3shp8lzcr1hw2ynylpn1nkvfyyrx80m60w"; sha256 = "1cq19zbsx4c57dc5gp3shp8lzcr1hw2ynylpn1nkvfyyrx80m60w";
}; };

View File

@ -1,11 +1,11 @@
{ stdenv, fetchurl }: { stdenv, fetchurl }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "libxl"; pname = "libxl";
version = "3.8.1"; version = "3.8.1";
src = fetchurl { src = fetchurl {
url = "http://www.libxl.com/download/${name}-lin-${version}.tar.gz"; url = "http://www.libxl.com/download/${pname}-lin-${version}.tar.gz";
sha256 = "1zdbahhyhr70s8hygwp43j9z4zmglyrr782hkcm1078yvkr2f2fm"; sha256 = "1zdbahhyhr70s8hygwp43j9z4zmglyrr782hkcm1078yvkr2f2fm";
}; };

View File

@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, premake5, doxygen, libsodium, mbedtls }: { stdenv, fetchFromGitHub, premake5, doxygen, libsodium, mbedtls }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "yojimbo"; pname = "yojimbo";
version = "1.1"; version = "1.1";
src = fetchFromGitHub { src = fetchFromGitHub {

View File

@ -1,9 +1,8 @@
{ stdenv, buildPythonPackage, isPy3k, fetchPypi, nose }: { stdenv, buildPythonPackage, isPy3k, fetchPypi, nose }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "Metaphone"; pname = "metaphone";
version = "0.6"; version = "0.6";
name = "metaphone-${version}";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;

View File

@ -19,7 +19,7 @@ buildPythonPackage rec {
patches = [ patches = [
(substituteAll { (substituteAll {
src = ./setup.patch; src = ./setup.patch;
version = "3${stdenv.lib.versions.minor python.version}"; version_ = "3${stdenv.lib.versions.minor python.version}";
}) })
]; ];

View File

@ -3,9 +3,9 @@
@@ -39,7 +39,7 @@ @@ -39,7 +39,7 @@
if '3' in l[2:]: if '3' in l[2:]:
return l.replace('libboost', 'boost') return l.replace('libboost', 'boost')
-libboost = get_libboost_name() -libboost = get_libboost_name()
+libboost = 'boost_python@version@' +libboost = 'boost_python@version_@'
setup( setup(
name='py3exiv2', name='py3exiv2',

View File

@ -4,7 +4,7 @@
}: }:
buildPythonPackage rec { buildPythonPackage rec {
name = "pyinputevent"; pname = "pyinputevent";
version = "2016-10-18"; version = "2016-10-18";
src = fetchFromGitHub { src = fetchFromGitHub {

View File

@ -4,7 +4,7 @@
}: }:
buildPythonPackage rec { buildPythonPackage rec {
name = "pymaging"; pname = "pymaging";
version = "unstable-2016-11-16"; version = "unstable-2016-11-16";
src = fetchFromGitHub { src = fetchFromGitHub {

View File

@ -5,7 +5,7 @@
}: }:
buildPythonPackage rec { buildPythonPackage rec {
name = "pymaging-png"; pname = "pymaging-png";
version = "unstable-2016-11-16"; version = "unstable-2016-11-16";
src = fetchFromGitHub { src = fetchFromGitHub {

View File

@ -11,11 +11,11 @@
}: }:
buildPythonPackage rec { buildPythonPackage rec {
name = "qutip"; pname = "qutip";
version = "2.2.0"; version = "2.2.0";
src = fetchurl { src = fetchurl {
url = "https://qutip.googlecode.com/files/QuTiP-2.2.0.tar.gz"; url = "https://qutip.googlecode.com/files/QuTiP-${version}.tar.gz";
sha256 = "a26a639d74b2754b3a1e329d91300e587e8c399d8a81d8f18a4a74c6d6f02ba3"; sha256 = "a26a639d74b2754b3a1e329d91300e587e8c399d8a81d8f18a4a74c6d6f02ba3";
}; };

View File

@ -7,7 +7,7 @@
}: }:
buildPythonPackage rec { buildPythonPackage rec {
name = "rbtools"; pname = "rbtools";
version = "0.7.2"; version = "0.7.2";
disabled = isPy3k; disabled = isPy3k;

View File

@ -4,7 +4,7 @@
}: }:
buildPythonPackage rec { buildPythonPackage rec {
name = "repocheck"; pname = "repocheck";
version = "2015-08-05"; version = "2015-08-05";
src = fetchFromGitHub { src = fetchFromGitHub {

View File

@ -6,7 +6,7 @@
}: }:
buildPythonPackage rec { buildPythonPackage rec {
name = "Snapper-GUI"; pname = "Snapper-GUI";
version = "0.1"; version = "0.1";
src = fetchgit { src = fetchgit {

View File

@ -25,7 +25,7 @@
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "Sphinx"; pname = "sphinx";
version = "1.7.9"; version = "1.7.9";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;

View File

@ -6,7 +6,7 @@
}: }:
buildPythonPackage { buildPythonPackage {
name = "svg2tikz"; pname = "svg2tikz";
version = "1.0.0"; version = "1.0.0";
disabled = ! isPy27; disabled = ! isPy27;

View File

@ -5,7 +5,7 @@
}: }:
buildPythonPackage rec { buildPythonPackage rec {
name = "urwidtrees"; pname = "urwidtrees";
version = "1.0"; version = "1.0";
src = fetchFromGitHub { src = fetchFromGitHub {

View File

@ -3,7 +3,6 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "waitress-django"; pname = "waitress-django";
version = "0.0.0"; version = "0.0.0";
name = pname;
src = ./.; src = ./.;
pythonPath = [ django_1_8 waitress ]; pythonPath = [ django_1_8 waitress ];

View File

@ -29,7 +29,7 @@ let
v8 = v8_3_16_14; v8 = v8_3_16_14;
rainbow_rake = buildRubyGem { rainbow_rake = buildRubyGem {
name = "rake"; pname = "rake";
gemName = "rake"; gemName = "rake";
source.sha256 = "01j8fc9bqjnrsxbppncai05h43315vmz9fwg28qdsgcjw9ck1d7n"; source.sha256 = "01j8fc9bqjnrsxbppncai05h43315vmz9fwg28qdsgcjw9ck1d7n";
type = "gem"; type = "gem";

View File

@ -2,7 +2,7 @@
, openssl, readline }: , openssl, readline }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "icr"; pname = "icr";
version = "0.5.0"; version = "0.5.0";
src = fetchFromGitHub { src = fetchFromGitHub {

View File

@ -3,12 +3,12 @@
with lib; with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "kubectx"; pname = "kubectx";
version = "0.6.1"; version = "0.6.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ahmetb"; owner = "ahmetb";
repo = "${name}"; repo = pname;
rev = "v${version}"; rev = "v${version}";
sha256 = "1507g8sm73mqfsxl3fabmj37pk9l4jddsdi4qlpf0ixhk3z1lfkg"; sha256 = "1507g8sm73mqfsxl3fabmj37pk9l4jddsdi4qlpf0ixhk3z1lfkg";
}; };

View File

@ -82,7 +82,7 @@ let
}; };
}; };
typeshed = stdenv.mkDerivation { typeshed = stdenv.mkDerivation {
name = "typeshed"; pname = "typeshed";
version = pyre-version; version = pyre-version;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "python"; owner = "python";

View File

@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, crystal, shards, which }: { stdenv, fetchFromGitHub, crystal, shards, which }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "scry"; pname = "scry";
# 0.7.1 doesn't work with crystal > 0.25 # 0.7.1 doesn't work with crystal > 0.25
version = "0.7.1.20180919"; version = "0.7.1.20180919";

View File

@ -6,11 +6,12 @@ let
, platform , platform
, extraMakeFlags ? [] , extraMakeFlags ? []
, extraMeta ? {} , extraMeta ? {}
, version ? "1.5"
, ... } @ args: , ... } @ args:
stdenv.mkDerivation (rec { stdenv.mkDerivation (rec {
name = "arm-trusted-firmware-${platform}-${version}"; name = "arm-trusted-firmware-${platform}-${version}";
version = "1.5"; inherit version;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ARM-software"; owner = "ARM-software";

View File

@ -26,7 +26,7 @@ in
let plugins = { let plugins = {
x770 = stdenv.mkDerivation rec { x770 = stdenv.mkDerivation rec {
name = "iscan-gt-x770-bundle"; pname = "iscan-gt-x770-bundle";
version = "1.0.1"; version = "1.0.1";
pluginVersion = "2.1.2-1"; pluginVersion = "2.1.2-1";
@ -58,7 +58,7 @@ let plugins = {
meta = common_meta // { description = "iscan esci x770 plugin for "+passthru.hw; }; meta = common_meta // { description = "iscan esci x770 plugin for "+passthru.hw; };
}; };
f720 = stdenv.mkDerivation rec { f720 = stdenv.mkDerivation rec {
name = "iscan-gt-f720-bundle"; pname = "iscan-gt-f720-bundle";
version = "1.0.1"; version = "1.0.1";
pluginVersion = "0.1.1-2"; pluginVersion = "0.1.1-2";

View File

@ -23,7 +23,7 @@ let
}; };
hplipState = substituteAll { hplipState = substituteAll {
inherit version; version_ = version;
src = ./hplip.state; src = ./hplip.state;
}; };

View File

@ -25,7 +25,7 @@ let
}; };
hplipState = substituteAll { hplipState = substituteAll {
inherit version; version_ = version;
src = ./hplip.state; src = ./hplip.state;
}; };

View File

@ -1,4 +1,4 @@
[plugin] [plugin]
installed=1 installed=1
eula=1 eula=1
version=@version@ version=@version_@

View File

@ -67,7 +67,7 @@ in with stdenv.lib.licenses;
buildPhase = "make"; buildPhase = "make";
}; };
beetle-pce-fast = (mkLibRetroCore rec { beetle-pce-fast = let der = (mkLibRetroCore rec {
core = "mednafen-pce-fast"; core = "mednafen-pce-fast";
src = fetchRetro { src = fetchRetro {
repo = "beetle-pce-fast-libretro"; repo = "beetle-pce-fast-libretro";
@ -76,12 +76,12 @@ in with stdenv.lib.licenses;
}; };
description = "Port of Mednafen's PC Engine core to libretro"; description = "Port of Mednafen's PC Engine core to libretro";
license = gpl2; license = gpl2;
}).override { }); in der.override {
buildPhase = "make"; buildPhase = "make";
name = "beetle-pce-fast"; name = "beetle-pce-fast-${der.version}";
}; };
beetle-psx = (mkLibRetroCore rec { beetle-psx = let der = (mkLibRetroCore rec {
core = "mednafen-psx"; core = "mednafen-psx";
src = fetchRetro { src = fetchRetro {
repo = "beetle-psx-libretro"; repo = "beetle-psx-libretro";
@ -90,12 +90,12 @@ in with stdenv.lib.licenses;
}; };
description = "Port of Mednafen's PSX Engine core to libretro"; description = "Port of Mednafen's PSX Engine core to libretro";
license = gpl2; license = gpl2;
}).override { }); in der.override {
buildPhase = "make"; buildPhase = "make";
name = "beetle-psx"; name = "beetle-psx-${der.version}";
}; };
beetle-saturn = (mkLibRetroCore rec { beetle-saturn = let der = (mkLibRetroCore rec {
core = "mednafen-saturn"; core = "mednafen-saturn";
src = fetchRetro { src = fetchRetro {
repo = "beetle-saturn-libretro"; repo = "beetle-saturn-libretro";
@ -104,9 +104,9 @@ in with stdenv.lib.licenses;
}; };
description = "Port of Mednafen's Saturn core to libretro"; description = "Port of Mednafen's Saturn core to libretro";
license = gpl2; license = gpl2;
}).override { }); in der.override {
buildPhase = "make"; buildPhase = "make";
name = "beetle-saturn"; name = "beetle-saturn-${der.version}";
meta.platforms = [ "x86_64-linux" ]; meta.platforms = [ "x86_64-linux" ];
}; };

View File

@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, autoreconfHook, libzip, boost, wt3, libconfig, pkgconfig } : { stdenv, fetchFromGitHub, autoreconfHook, libzip, boost, wt3, libconfig, pkgconfig } :
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "fileshelter"; pname = "fileshelter";
version = "3.0.0"; version = "3.0.0";
src = fetchFromGitHub { src = fetchFromGitHub {

View File

@ -65,6 +65,8 @@ rec {
, pos ? # position used in error messages and for meta.position , pos ? # position used in error messages and for meta.position
(if attrs.meta.description or null != null (if attrs.meta.description or null != null
then builtins.unsafeGetAttrPos "description" attrs.meta then builtins.unsafeGetAttrPos "description" attrs.meta
else if attrs.version or null != null
then builtins.unsafeGetAttrPos "version" attrs
else builtins.unsafeGetAttrPos "name" attrs) else builtins.unsafeGetAttrPos "name" attrs)
, separateDebugInfo ? false , separateDebugInfo ? false
, outputs ? [ "out" ] , outputs ? [ "out" ]
@ -79,6 +81,15 @@ rec {
, ... } @ attrs: , ... } @ attrs:
let let
# Check that the name is consistent with pname and version:
selfConsistent = (with attrs; attrs ? "name" ->
(lib.assertMsg (attrs ? "version" -> lib.strings.hasInfix version name)
"version ${version} does not appear in name ${name}" &&
lib.assertMsg (attrs ? "pname" -> lib.strings.hasInfix pname name)
"pname ${pname} does not appear in name ${name}"));
computedName = if name != "" then name else "${attrs.pname}-${attrs.version}";
# TODO(@oxij, @Ericson2314): This is here to keep the old semantics, remove when # TODO(@oxij, @Ericson2314): This is here to keep the old semantics, remove when
# no package has `doCheck = true`. # no package has `doCheck = true`.
doCheck' = doCheck && stdenv.hostPlatform == stdenv.buildPlatform; doCheck' = doCheck && stdenv.hostPlatform == stdenv.buildPlatform;
@ -175,7 +186,7 @@ rec {
// { // {
# A hack to make `nix-env -qa` and `nix search` ignore broken packages. # A hack to make `nix-env -qa` and `nix search` ignore broken packages.
# TODO(@oxij): remove this assert when something like NixOS/nix#1771 gets merged into nix. # TODO(@oxij): remove this assert when something like NixOS/nix#1771 gets merged into nix.
name = assert validity.handled && (separateDebugInfo -> stdenv.hostPlatform.isLinux); name + lib.optionalString name = assert selfConsistent && validity.handled && (separateDebugInfo -> stdenv.hostPlatform.isLinux); computedName + lib.optionalString
# Fixed-output derivations like source tarballs shouldn't get a host # Fixed-output derivations like source tarballs shouldn't get a host
# suffix. But we have some weird ones with run-time deps that are # suffix. But we have some weird ones with run-time deps that are
# just used for their side-affects. Those might as well since the # just used for their side-affects. Those might as well since the
@ -287,7 +298,7 @@ rec {
meta = { meta = {
# `name` above includes cross-compilation cruft (and is under assert), # `name` above includes cross-compilation cruft (and is under assert),
# lets have a clean always accessible version here. # lets have a clean always accessible version here.
inherit name; name = computedName;
# If the packager hasn't specified `outputsToInstall`, choose a default, # If the packager hasn't specified `outputsToInstall`, choose a default,
# which is the name of `p.bin or p.out or p`; # which is the name of `p.bin or p.out or p`;

View File

@ -1,6 +1,6 @@
{ stdenv, fetchzip }: { stdenv, fetchzip }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "hid-listen"; pname = "hid-listen";
version = "1.01"; version = "1.01";
src = fetchzip { src = fetchzip {

View File

@ -3,11 +3,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "modem-manager-${version}"; name = "modem-manager-${version}";
pname = "ModemManager";
version = "1.7.990"; version = "1.7.990";
package = "ModemManager";
src = fetchurl { src = fetchurl {
url = "https://www.freedesktop.org/software/${pname}/${pname}-${version}.tar.xz"; url = "https://www.freedesktop.org/software/${package}/${package}-${version}.tar.xz";
sha256 = "1v4hixmghlrw7w4ajq2x4k62js0594h223d0yma365zwqr7hjrfl"; sha256 = "1v4hixmghlrw7w4ajq2x4k62js0594h223d0yma365zwqr7hjrfl";
}; };

View File

@ -12,7 +12,7 @@ let
}; };
wrappedPython = python3.withPackages (_: [ threaded_servers ]); wrappedPython = python3.withPackages (_: [ threaded_servers ]);
in stdenv.mkDerivation { in stdenv.mkDerivation {
name = "quickserve"; pname = "quickserve";
version = "2018"; version = "2018";
unpackPhase = ":"; unpackPhase = ":";

View File

@ -6,10 +6,10 @@ let numVersion = "02.18"; # :(
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "lshw-${numVersion}b"; name = "lshw-${numVersion}b";
version = "B.${numVersion}"; version = "${numVersion}";
src = fetchurl { src = fetchurl {
url = "https://ezix.org/software/files/lshw-${version}.tar.gz"; url = "https://ezix.org/software/files/lshw-B.${version}.tar.gz";
sha256 = "0brwra4jld0d53d7jsgca415ljglmmx1l2iazpj4ndilr48yy8mf"; sha256 = "0brwra4jld0d53d7jsgca415ljglmmx1l2iazpj4ndilr48yy8mf";
}; };

View File

@ -20,6 +20,7 @@ let
}); });
pathspec = super.pathspec.overridePythonAttrs (oldAttrs: rec { pathspec = super.pathspec.overridePythonAttrs (oldAttrs: rec {
name = "${oldAttrs.pname}-${version}";
version = "0.5.5"; version = "0.5.5";
src = oldAttrs.src.override { src = oldAttrs.src.override {
inherit version; inherit version;

View File

@ -10553,6 +10553,7 @@ with pkgs;
in in
(gap.override { keepAllPackages = false; }).overrideAttrs (oldAttrs: { (gap.override { keepAllPackages = false; }).overrideAttrs (oldAttrs: {
name = "libgap-${oldAttrs.pname}-${version}"; name = "libgap-${oldAttrs.pname}-${version}";
inherit version;
src = fetchurl { src = fetchurl {
url = "https://www.gap-system.org/pub/gap/gap48/tar.bz2/gap${version}_${pkgVer}.tar.bz2"; url = "https://www.gap-system.org/pub/gap/gap48/tar.bz2/gap${version}_${pkgVer}.tar.bz2";
sha256 = "19n2p1mdg33s2x9rs51iak7rgndc1cwr56jyqnah0g1ydgg1yh6b"; sha256 = "19n2p1mdg33s2x9rs51iak7rgndc1cwr56jyqnah0g1ydgg1yh6b";

View File

@ -3727,6 +3727,7 @@ in {
sphinx_1_2 = self.sphinx.overridePythonAttrs rec { sphinx_1_2 = self.sphinx.overridePythonAttrs rec {
name = "sphinx-1.2.3"; name = "sphinx-1.2.3";
version = "1.2.3";
src = pkgs.fetchurl { src = pkgs.fetchurl {
url = "mirror://pypi/s/sphinx/sphinx-1.2.3.tar.gz"; url = "mirror://pypi/s/sphinx/sphinx-1.2.3.tar.gz";
sha256 = "94933b64e2fe0807da0612c574a021c0dac28c7bd3c4a23723ae5a39ea8f3d04"; sha256 = "94933b64e2fe0807da0612c574a021c0dac28c7bd3c4a23723ae5a39ea8f3d04";