diff options
Diffstat (limited to 'npins')
-rw-r--r-- | npins/default.nix | 80 | ||||
-rw-r--r-- | npins/sources.json | 95 |
2 files changed, 0 insertions, 175 deletions
diff --git a/npins/default.nix b/npins/default.nix deleted file mode 100644 index 5e7d086e..00000000 --- a/npins/default.nix +++ /dev/null @@ -1,80 +0,0 @@ -# Generated by npins. Do not modify; will be overwritten regularly -let - data = builtins.fromJSON (builtins.readFile ./sources.json); - version = data.version; - - mkSource = - spec: - assert spec ? type; - let - path = - if spec.type == "Git" then - mkGitSource spec - else if spec.type == "GitRelease" then - mkGitSource spec - else if spec.type == "PyPi" then - mkPyPiSource spec - else if spec.type == "Channel" then - mkChannelSource spec - else - builtins.throw "Unknown source type ${spec.type}"; - in - spec // { outPath = path; }; - - mkGitSource = - { - repository, - revision, - url ? null, - hash, - branch ? null, - ... - }: - assert repository ? type; - # At the moment, either it is a plain git repository (which has an url), or it is a GitHub/GitLab repository - # In the latter case, there we will always be an url to the tarball - if url != null then - (builtins.fetchTarball { - inherit url; - sha256 = hash; # FIXME: check nix version & use SRI hashes - }) - else - assert repository.type == "Git"; - let - urlToName = - url: rev: - let - matched = builtins.match "^.*/([^/]*)(\\.git)?$" repository.url; - - short = builtins.substring 0 7 rev; - - appendShort = if (builtins.match "[a-f0-9]*" rev) != null then "-${short}" else ""; - in - "${if matched == null then "source" else builtins.head matched}${appendShort}"; - name = urlToName repository.url revision; - in - builtins.fetchGit { - url = repository.url; - rev = revision; - inherit name; - # hash = hash; - }; - - mkPyPiSource = - { url, hash, ... }: - builtins.fetchurl { - inherit url; - sha256 = hash; - }; - - mkChannelSource = - { url, hash, ... }: - builtins.fetchTarball { - inherit url; - sha256 = hash; - }; -in -if version == 3 then - builtins.mapAttrs (_: mkSource) data.pins -else - throw "Unsupported format version ${toString version} in sources.json. Try running `npins upgrade`" diff --git a/npins/sources.json b/npins/sources.json deleted file mode 100644 index 8902a51b..00000000 --- a/npins/sources.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "pins": { - "agenix": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "ryantm", - "repo": "agenix" - }, - "branch": "main", - "revision": "de96bd907d5fbc3b14fc33ad37d1b9a3cb15edc6", - "url": "https://github.com/ryantm/agenix/archive/de96bd907d5fbc3b14fc33ad37d1b9a3cb15edc6.tar.gz", - "hash": "0rkcx72bq7fm5b1qy1nrzp8v93nv784wh11srgi3pi0m6sr9g03f" - }, - "darwin": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "lnl7", - "repo": "nix-darwin" - }, - "branch": "master", - "revision": "5ce8503cf402cf76b203eba4b7e402bea8e44abc", - "url": "https://github.com/lnl7/nix-darwin/archive/5ce8503cf402cf76b203eba4b7e402bea8e44abc.tar.gz", - "hash": "1ycikywx3xkkz3kq8bm1gh0savgif30hnilj847q5jp9jjq41y68" - }, - "emacs-overlay": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "nix-community", - "repo": "emacs-overlay" - }, - "branch": "master", - "revision": "7c521a93160b3f3deb2325ba5485eabaecc76100", - "url": "https://github.com/nix-community/emacs-overlay/archive/7c521a93160b3f3deb2325ba5485eabaecc76100.tar.gz", - "hash": "0ny81s9rdaqfiscx8508wl3sbwxw7xaglkyjlnid202wrfm9hbvn" - }, - "home-manager": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "nix-community", - "repo": "home-manager" - }, - "branch": "master", - "revision": "90ae324e2c56af10f20549ab72014804a3064c7f", - "url": "https://github.com/nix-community/home-manager/archive/90ae324e2c56af10f20549ab72014804a3064c7f.tar.gz", - "hash": "1nl57zw3y85mx2w2kj634ra54p9alfsnzb67c1z3fbbdwgqr1rcx" - }, - "nix-index-database": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "Mic92", - "repo": "nix-index-database" - }, - "branch": "main", - "revision": "afc8f5a6a2c00a89a6d6bdcaf4157797960f10f7", - "url": "https://github.com/Mic92/nix-index-database/archive/afc8f5a6a2c00a89a6d6bdcaf4157797960f10f7.tar.gz", - "hash": "0kh8nyxp44wv5i37jwylf6vvjcwnr6zfqavxajb3zglhkrdfija6" - }, - "nixos-hardware": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "NixOS", - "repo": "nixos-hardware" - }, - "branch": "master", - "revision": "c5013aa7ce2c7ec90acee5d965d950c8348db751", - "url": "https://github.com/NixOS/nixos-hardware/archive/c5013aa7ce2c7ec90acee5d965d950c8348db751.tar.gz", - "hash": "1377icivqvp0mlxx5bw9km3fmhbgsb2ihswrbcprbvbc1c8avwqv" - }, - "nixpkgs": { - "type": "Channel", - "name": "nixos-unstable", - "url": "https://releases.nixos.org/nixos/unstable/nixos-24.11pre652902.693bc46d169f/nixexprs.tar.xz", - "hash": "1s8is34i3kkhyxjgi1j9k7ld5x7h2gz4al64cl3sldmlfq47irsd" - }, - "nur": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "nix-community", - "repo": "NUR" - }, - "branch": "master", - "revision": "15294a7608667827abcf4a98753feec08a3eab71", - "url": "https://github.com/nix-community/NUR/archive/15294a7608667827abcf4a98753feec08a3eab71.tar.gz", - "hash": "02lc0hc863ag548drblpfzzmdy38kch2yn6glgb2582yj1c24ank" - } - }, - "version": 3 -} \ No newline at end of file |