summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2017-08-11 23:13:53 +0200
committerRobin Gloster <mail@glob.in>2017-08-11 23:31:02 +0200
commitf48109387ab1179fa66e3ea0362f6755a3bb9006 (patch)
treee4c68509547bb58f053540ef5d2f485eab31fb3c
parent6c1528c48d3959c77cf32fa181877f071cabbe41 (diff)
downloadnixpkgs-f48109387ab1179fa66e3ea0362f6755a3bb9006.tar
nixpkgs-f48109387ab1179fa66e3ea0362f6755a3bb9006.tar.gz
nixpkgs-f48109387ab1179fa66e3ea0362f6755a3bb9006.tar.bz2
nixpkgs-f48109387ab1179fa66e3ea0362f6755a3bb9006.tar.lz
nixpkgs-f48109387ab1179fa66e3ea0362f6755a3bb9006.tar.xz
nixpkgs-f48109387ab1179fa66e3ea0362f6755a3bb9006.tar.zst
nixpkgs-f48109387ab1179fa66e3ea0362f6755a3bb9006.zip
mergeAttrsByVersion, versionedDerivation: remove
obsolete and ancient
-rw-r--r--lib/deprecated.nix42
-rw-r--r--pkgs/misc/misc.nix5
-rw-r--r--pkgs/top-level/all-packages.nix1
3 files changed, 0 insertions, 48 deletions
diff --git a/lib/deprecated.nix b/lib/deprecated.nix
index d4e78c39250..8cdfab381ba 100644
--- a/lib/deprecated.nix
+++ b/lib/deprecated.nix
@@ -309,48 +309,6 @@ rec {
   mergeAttrsByFuncDefaults = foldl mergeAttrByFunc { inherit mergeAttrBy; };
   mergeAttrsByFuncDefaultsClean = list: removeAttrs (mergeAttrsByFuncDefaults list) ["mergeAttrBy"];
 
-  # merge attrs based on version key into mkDerivation args, see mergeAttrBy to learn about smart merge defaults
-  #
-  # This function is best explained by an example:
-  #
-  #     {version ? "2.x"}:
-  #
-  #     mkDerivation (mergeAttrsByVersion "package-name" version
-  #       { # version specific settings
-  #         "git" = { src = ..; preConfigre = "autogen.sh"; buildInputs = [automake autoconf libtool];  };
-  #         "2.x" = { src = ..; };
-  #       }
-  #       {  // shared settings
-  #          buildInputs = [ common build inputs ];
-  #          meta = { .. }
-  #       }
-  #     )
-  #
-  # Please note that e.g. Eelco Dolstra usually prefers having one file for
-  # each version. On the other hand there are valuable additional design goals
-  #  - readability
-  #  - do it once only
-  #  - try to avoid duplication
-  #
-  # Marc Weber and Michael Raskin sometimes prefer keeping older
-  # versions around for testing and regression tests - as long as its cheap to
-  # do so.
-  #
-  # Very often it just happens that the "shared" code is the bigger part.
-  # Then using this function might be appropriate.
-  #
-  # Be aware that its easy to cause recompilations in all versions when using
-  # this function - also if derivations get too complex splitting into multiple
-  # files is the way to go.
-  #
-  # See misc.nix -> versionedDerivation
-  # discussion: nixpkgs: pull/310
-  mergeAttrsByVersion = name: version: attrsByVersion: base:
-    mergeAttrsByFuncDefaultsClean [ { name = "${name}-${version}"; }
-                                    base
-                                    (maybeAttr version (throw "bad version ${version} for ${name}") attrsByVersion)
-                                  ];
-
   # sane defaults (same name as attr name so that inherit can be used)
   mergeAttrBy = # { buildInputs = concatList; [...]; passthru = mergeAttr; [..]; }
     listToAttrs (map (n: nameValuePair n lib.concat)
diff --git a/pkgs/misc/misc.nix b/pkgs/misc/misc.nix
index a3c293beab3..cb4765957f1 100644
--- a/pkgs/misc/misc.nix
+++ b/pkgs/misc/misc.nix
@@ -5,11 +5,6 @@ let inherit (pkgs) stdenv runCommand perl lib;
 in
 
 {
-
-  # description see mergeAttrsByVersion in lib/misc.nix
-  versionedDerivation = name: version: attrsByVersion: base:
-    pkgs.stdenv.mkDerivation (stdenv.lib.mergeAttrsByVersion name version attrsByVersion base);
-
   /*
     Usage example creating a derivation installing ruby, sup and a lib:
 
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 0869c46849a..890d7225e30 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -50,7 +50,6 @@ with pkgs;
   inherit lib config;
 
   inherit (lib) lowPrio hiPrio appendToName makeOverridable;
-  inherit (misc) versionedDerivation;
 
   # Applying this to an attribute set will cause nix-env to look
   # inside the set for derivations.