mirror of
https://github.com/nmattia/niv.git
synced 2024-11-07 22:36:53 +03:00
sources.nix: cleaning
- Remove fetchTarball which is dead code - Add a header comment specifying sources.nix is a generated file
This commit is contained in:
parent
82bd4999de
commit
4c6b3c2451
9
Main.hs
9
Main.hs
@ -608,6 +608,8 @@ pathNixSourcesNix = "nix" </> "sources.nix"
|
||||
-- | Glue code between nix and sources.json
|
||||
initNixSourcesNixContent :: String
|
||||
initNixSourcesNixContent = [s|
|
||||
# This file has been generated by Niv.
|
||||
|
||||
# A record, from name to path, of the third-party packages
|
||||
with rec
|
||||
{
|
||||
@ -615,13 +617,6 @@ with rec
|
||||
|
||||
sources = builtins.fromJSON (builtins.readFile ./sources.json);
|
||||
|
||||
# fetchTarball version that is compatible between all the sources of Nix
|
||||
fetchTarball =
|
||||
{ url, sha256 }:
|
||||
if builtins.lessThan builtins.nixVersion "1.12" then
|
||||
builtins.fetchTarball { inherit url; }
|
||||
else
|
||||
builtins.fetchTarball { inherit url sha256; };
|
||||
mapAttrs = builtins.mapAttrs or
|
||||
(f: set: with builtins;
|
||||
listToAttrs (map (attr: { name = attr; value = f attr set.${attr}; }) (attrNames set)));
|
||||
|
Loading…
Reference in New Issue
Block a user