aboutsummaryrefslogtreecommitdiffstats
path: root/npins
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--npins/default.nix45
-rw-r--r--npins/sources.json139
2 files changed, 97 insertions, 87 deletions
diff --git a/npins/default.nix b/npins/default.nix
index 884fc8cc..8ec5eca6 100644
--- a/npins/default.nix
+++ b/npins/default.nix
@@ -65,7 +65,9 @@ let
if pkgs == null then
{
inherit (builtins) fetchTarball fetchurl;
- # For some fucking reason, fetchGit has a different signature than the other builtin fetchers …
+ # Frustratingly, due to flakes and `fetchTree`, `fetchGit`
+ # has a different signature than the other builtin
+ # fetchers
fetchGit = args: (builtins.fetchGit args).outPath;
}
else
@@ -95,7 +97,6 @@ let
};
};
- # Dispatch to the correct code path based on the type
path =
if spec.type == "Git" then
mkGitSource fetchers spec
@@ -105,8 +106,8 @@ let
mkPyPiSource fetchers spec
else if spec.type == "Channel" then
mkChannelSource fetchers spec
- else if spec.type == "Tarball" then
- mkTarballSource fetchers spec
+ else if spec.type == "Url" || spec.type == "MutableUrl" then
+ mkUrlSource fetchers spec
else if spec.type == "Container" then
mkContainerSource pkgs spec
else
@@ -192,16 +193,20 @@ let
sha256 = hash;
};
- mkTarballSource =
- { fetchTarball, ... }:
+ mkUrlSource =
+ {
+ fetchTarball,
+ fetchurl,
+ ...
+ }:
{
url,
- locked_url ? url,
hash,
+ unpack,
...
}:
- fetchTarball {
- url = locked_url;
+ (if unpack then fetchTarball else fetchurl) {
+ inherit url;
sha256 = hash;
};
@@ -211,16 +216,22 @@ let
image_name,
image_tag,
image_digest,
+ hash,
...
- }:
+ }@args:
if pkgs == null then
builtins.throw "container sources require passing in a Nixpkgs value: https://github.com/andir/npins/blob/master/README.md#using-the-nixpkgs-fetchers"
else
- pkgs.dockerTools.pullImage {
- imageName = image_name;
- imageDigest = image_digest;
- finalImageTag = image_tag;
- };
+ pkgs.dockerTools.pullImage (
+ {
+ imageName = image_name;
+ imageDigest = image_digest;
+ finalImageTag = image_tag;
+ hash = hash;
+ }
+ // (if args.arch or null != null then { arch = args.arch; } else { })
+ );
+
in
mkFunctor (
{
@@ -231,7 +242,7 @@ mkFunctor (
if builtins.isPath input then
# while `readFile` will throw an error anyways if the path doesn't exist,
# we still need to check beforehand because *our* error can be caught but not the one from the builtin
- # *piegames sighs*
+ # See: <https://git.lix.systems/lix-project/lix/issues/1098>
if builtins.pathExists input then
builtins.fromJSON (builtins.readFile input)
else
@@ -242,7 +253,7 @@ mkFunctor (
throw "Unsupported input type ${builtins.typeOf input}, must be a path or an attrset";
version = data.version;
in
- if version == 7 then
+ if version == 8 then
builtins.mapAttrs (name: spec: mkFunctor (mkSource name spec)) 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
index c3ff6cb0..919d6b3e 100644
--- a/npins/sources.json
+++ b/npins/sources.json
@@ -14,6 +14,18 @@
"url": "https://codeberg.org/bpeetz/flake-templates/archive/0294fb03df7c265f8fae24a9e775d69a953bbf03.tar.gz",
"hash": "sha256-rI1qMFzbXVjfEvmf2OS4upnibXpL21its6cCXqhz86o="
},
+ "unflake_git_https---git-foss-syndicate-org-bpeetz-forks-atuin_ref_main": {
+ "type": "Git",
+ "repository": {
+ "type": "Git",
+ "url": "https://git.foss-syndicate.org/bpeetz/forks/atuin"
+ },
+ "branch": "main",
+ "submodules": false,
+ "revision": "3ba41b526d57368bfa8d151fd777865370c24f6b",
+ "url": null,
+ "hash": "sha256-6upceGLe7W2i00Qsv4fPQUuAIAUpHK8Tm/dsmoQ4SzI="
+ },
"unflake_git_https---git-foss-syndicate-org-bpeetz-qmk_layout_ref_prime": {
"type": "Git",
"repository": {
@@ -61,9 +73,9 @@
},
"branch": "master",
"submodules": false,
- "revision": "61ab0e80d9c7ab14c256b5b453d8b3fb0189ba0a",
- "url": "https://github.com/cachix/pre-commit-hooks.nix/archive/61ab0e80d9c7ab14c256b5b453d8b3fb0189ba0a.tar.gz",
- "hash": "sha256-kTwur1wV+01SdqskVMSo6JMEpg71ps3HpbFY2GsflKs="
+ "revision": "43b3c1ab9d40fb1dbb008f451988a91e375825e9",
+ "url": "https://github.com/cachix/pre-commit-hooks.nix/archive/43b3c1ab9d40fb1dbb008f451988a91e375825e9.tar.gz",
+ "hash": "sha256-ReRHaLgr/uVqdD8afFSn+myXIfpHeOhP0yYe0TJqAA8="
},
"unflake_github_hercules-ci_flake-parts": {
"type": "Git",
@@ -74,22 +86,9 @@
},
"branch": "main",
"submodules": false,
- "revision": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb",
- "url": "https://github.com/hercules-ci/flake-parts/archive/f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb.tar.gz",
- "hash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4="
- },
- "unflake_github_hercules-ci_gitignore-nix": {
- "type": "Git",
- "repository": {
- "type": "GitHub",
- "owner": "hercules-ci",
- "repo": "gitignore.nix"
- },
- "branch": "master",
- "submodules": false,
- "revision": "cb5e3fdca1de58ccbc3ef53de65bd372b48f567c",
- "url": "https://github.com/hercules-ci/gitignore.nix/archive/cb5e3fdca1de58ccbc3ef53de65bd372b48f567c.tar.gz",
- "hash": "sha256-XmjITeZNMTQXGhhww6ed/Wacy2KzD6svioyCX7pkUu4="
+ "revision": "17c9d6cdfc60c64f4ee8d306f9bc0b4ccb51481e",
+ "url": "https://github.com/hercules-ci/flake-parts/archive/17c9d6cdfc60c64f4ee8d306f9bc0b4ccb51481e.tar.gz",
+ "hash": "sha256-vp6Y/Grm98ESt6ceOkWiHWyZRDV3J1RID4w+6NWK9yA="
},
"unflake_github_ipetkov_crane": {
"type": "Git",
@@ -100,9 +99,9 @@
},
"branch": "master",
"submodules": false,
- "revision": "0532eb17955225173906d671fb36306bdeb1e2dc",
- "url": "https://github.com/ipetkov/crane/archive/0532eb17955225173906d671fb36306bdeb1e2dc.tar.gz",
- "hash": "sha256-EVZd2RsbpreRUDSi9rBwPY+ZxoyMaiEBbZxxhljbaS4="
+ "revision": "7930f6c291de6f83c257839d434592aa085f290a",
+ "url": "https://github.com/ipetkov/crane/archive/7930f6c291de6f83c257839d434592aa085f290a.tar.gz",
+ "hash": "sha256-TkTWNhJV/8Wk3czlbz4bwHZkFCaCHPsOy+oJe4PUiXg="
},
"unflake_github_lnl7_nix-darwin_ref_master": {
"type": "Git",
@@ -113,9 +112,9 @@
},
"branch": "master",
"submodules": false,
- "revision": "56c666e108467d87d13508936aade6d567f2a501",
- "url": "https://github.com/lnl7/nix-darwin/archive/56c666e108467d87d13508936aade6d567f2a501.tar.gz",
- "hash": "sha256-zXcwYQGCT6pzinK+1dBB2ekTVtfxGZAapb3Evdcu4fY="
+ "revision": "57a3171f94705599a2499248ca5758d5eb47c0e0",
+ "url": "https://github.com/lnl7/nix-darwin/archive/57a3171f94705599a2499248ca5758d5eb47c0e0.tar.gz",
+ "hash": "sha256-UvORnAxTRHax7RG74W8Z2t4GvIkX6AjJ5kk0QlwZomo="
},
"unflake_github_nix-community_disko_ref_master": {
"type": "Git",
@@ -126,9 +125,9 @@
},
"branch": "master",
"submodules": false,
- "revision": "115e5211780054d8a890b41f0b7734cafad54dfe",
- "url": "https://github.com/nix-community/disko/archive/115e5211780054d8a890b41f0b7734cafad54dfe.tar.gz",
- "hash": "sha256-eTAlX0CwgB84Ts3GaBd944A3DRXVMzgA0EqroZBISUo="
+ "revision": "ff8702b4de27f72b4c78573dfb89ec74e36abdf1",
+ "url": "https://github.com/nix-community/disko/archive/ff8702b4de27f72b4c78573dfb89ec74e36abdf1.tar.gz",
+ "hash": "sha256-RxWs5ND31KzTG7wvMM+PMfUjyNpmIEr999lqNARaM5o="
},
"unflake_github_nix-community_home-manager": {
"type": "Git",
@@ -139,9 +138,9 @@
},
"branch": "master",
"submodules": false,
- "revision": "f384af1bec6423a0d4ba1855917ab948f64e5808",
- "url": "https://github.com/nix-community/home-manager/archive/f384af1bec6423a0d4ba1855917ab948f64e5808.tar.gz",
- "hash": "sha256-s7Tv6FUQThRAvW8En8XVC6HMb0uiikzVccCcCo9u/Bg="
+ "revision": "079a3b5d1aa6a719920a51316253b7d6dd22738d",
+ "url": "https://github.com/nix-community/home-manager/archive/079a3b5d1aa6a719920a51316253b7d6dd22738d.tar.gz",
+ "hash": "sha256-JWq0BfjO4ktpH5USfQNQzdvHpIDT8fSKD5K7LvdMRFs="
},
"unflake_github_nix-community_home-manager_ref_master": {
"type": "Git",
@@ -152,9 +151,9 @@
},
"branch": "master",
"submodules": false,
- "revision": "f384af1bec6423a0d4ba1855917ab948f64e5808",
- "url": "https://github.com/nix-community/home-manager/archive/f384af1bec6423a0d4ba1855917ab948f64e5808.tar.gz",
- "hash": "sha256-s7Tv6FUQThRAvW8En8XVC6HMb0uiikzVccCcCo9u/Bg="
+ "revision": "079a3b5d1aa6a719920a51316253b7d6dd22738d",
+ "url": "https://github.com/nix-community/home-manager/archive/079a3b5d1aa6a719920a51316253b7d6dd22738d.tar.gz",
+ "hash": "sha256-JWq0BfjO4ktpH5USfQNQzdvHpIDT8fSKD5K7LvdMRFs="
},
"unflake_github_nix-community_impermanence_ref_master": {
"type": "Git",
@@ -169,7 +168,7 @@
"url": "https://github.com/nix-community/impermanence/archive/7b1d382faf603b6d264f58627330f9faa5cba149.tar.gz",
"hash": "sha256-03+JxvzmfwRu+5JafM0DLbxgHttOQZkUtDWBmeUkN8Y="
},
- "unflake_github_nix-community_lanzaboote_ref_v1-0-0": {
+ "unflake_github_nix-community_lanzaboote_ref_v1-1-0": {
"type": "GitRelease",
"repository": {
"type": "GitHub",
@@ -180,10 +179,10 @@
"version_upper_bound": null,
"release_prefix": null,
"submodules": false,
- "version": "v1.0.0",
- "revision": "2fe211d9c0e2320ce23dc995a3f93666ca149d9a",
- "url": "https://api.github.com/repos/nix-community/lanzaboote/tarball/refs/tags/v1.0.0",
- "hash": "sha256-RJmgVDzjRI18BWVogG6wpsl1UCuV6ui8qr4DJ1LfWZ8="
+ "version": "v1.1.0",
+ "revision": "7c9a54a7f87b4539ddbd8bda09a8a5f5f9361aa9",
+ "url": "https://api.github.com/repos/nix-community/lanzaboote/tarball/refs/tags/v1.1.0",
+ "hash": "sha256-hqijVSEETttmo8Okql9/LG0Ua34hdciKW1a5zzlj8mU="
},
"unflake_github_nix-community_nix-index-database_ref_main": {
"type": "Git",
@@ -194,9 +193,9 @@
},
"branch": "main",
"submodules": false,
- "revision": "97df9dc0b7c924344b793a15c1e8e4522ebb854e",
- "url": "https://github.com/nix-community/nix-index-database/archive/97df9dc0b7c924344b793a15c1e8e4522ebb854e.tar.gz",
- "hash": "sha256-4axz3OBPTKa6LIkXV8n0lc63MQU+et2CB5DGobEAi6k="
+ "revision": "4f8d52a3598b0dc7db7a5e7b419e3edd9d1ecfdb",
+ "url": "https://github.com/nix-community/nix-index-database/archive/4f8d52a3598b0dc7db7a5e7b419e3edd9d1ecfdb.tar.gz",
+ "hash": "sha256-Q5kNLlWngt7TaIIZoxDKWMHjiSaNRVqr70FqWCRRfr4="
},
"unflake_github_nix-community_nixos-generators_ref_master": {
"type": "Git",
@@ -220,9 +219,9 @@
},
"branch": "master",
"submodules": false,
- "revision": "49d924421d7c3175edc499fdc738bd70d69d97d5",
- "url": "https://github.com/nix-community/nixpkgs.lib/archive/49d924421d7c3175edc499fdc738bd70d69d97d5.tar.gz",
- "hash": "sha256-/LAL+E75c0ioCHxyVFGwzXorfuHzToKgqPUCRq4RTIY="
+ "revision": "e978bdeeff2de8eb5454396f6557e655845b32c7",
+ "url": "https://github.com/nix-community/nixpkgs.lib/archive/e978bdeeff2de8eb5454396f6557e655845b32c7.tar.gz",
+ "hash": "sha256-DFY3+18Zijt5odIlo/G2gn1cXbU9rVim01NG1zHbpxs="
},
"unflake_github_nix-community_nixvim_ref_main": {
"type": "Git",
@@ -233,9 +232,9 @@
},
"branch": "main",
"submodules": false,
- "revision": "b7521616f15ad73c6bec458d64ed7f06f4095edb",
- "url": "https://github.com/nix-community/nixvim/archive/b7521616f15ad73c6bec458d64ed7f06f4095edb.tar.gz",
- "hash": "sha256-ZRAMRXQE1UKBtpnPwwOqV8teaPDD/fdABvUXMjcyhow="
+ "revision": "f316e949e0ed9df0e1e0bf645c6dce721d4e230e",
+ "url": "https://github.com/nix-community/nixvim/archive/f316e949e0ed9df0e1e0bf645c6dce721d4e230e.tar.gz",
+ "hash": "sha256-T32JXjZ7kIbhBn8/Har171yGg6IBdl97cxAWameqZDE="
},
"unflake_github_nix-systems_default": {
"type": "Git",
@@ -311,9 +310,9 @@
},
"branch": "nixos-26.05",
"submodules": false,
- "revision": "b51242d7d43689db2f3be91bd05d5b24fbb469c4",
- "url": "https://github.com/nixos/nixpkgs/archive/b51242d7d43689db2f3be91bd05d5b24fbb469c4.tar.gz",
- "hash": "sha256-K5sT4jTpGs15ADhviMKNBH38REpPf5Q6mM1+N6cArVE="
+ "revision": "b3fe9581c9061c749abef42b6d4ee7b7c05c33fa",
+ "url": "https://github.com/nixos/nixpkgs/archive/b3fe9581c9061c749abef42b6d4ee7b7c05c33fa.tar.gz",
+ "hash": "sha256-2V/6imsUgB7mPZlHY54oeVBRDoZbPKnvzwkAHUSSufk="
},
"unflake_github_nixos_nixpkgs_ref_nixos-unstable": {
"type": "Git",
@@ -324,9 +323,9 @@
},
"branch": "nixos-unstable",
"submodules": false,
- "revision": "331800de5053fcebacf6813adb5db9c9dca22a0c",
- "url": "https://github.com/nixos/nixpkgs/archive/331800de5053fcebacf6813adb5db9c9dca22a0c.tar.gz",
- "hash": "sha256-x5UQuRsH3MqI0U9afaXSNqzTPSeZlRLvFAav2Ux1pNw="
+ "revision": "e2587caef70cea85dd97d7daab492899902dbf5d",
+ "url": "https://github.com/nixos/nixpkgs/archive/e2587caef70cea85dd97d7daab492899902dbf5d.tar.gz",
+ "hash": "sha256-wWFrV5/Qbm+lyt5x20E/bSbfJiGKMo4RCxZV8cl/WZI="
},
"unflake_github_nixos_nixpkgs_ref_nixos-unstable-small": {
"type": "Git",
@@ -337,9 +336,9 @@
},
"branch": "nixos-unstable-small",
"submodules": false,
- "revision": "c8560a2e8ad260841c482fe30731087b92f2223e",
- "url": "https://github.com/nixos/nixpkgs/archive/c8560a2e8ad260841c482fe30731087b92f2223e.tar.gz",
- "hash": "sha256-JsufhU/MyfEEJMNmtmW0DY6LbOVIjjPS0zGQpHvgrBY="
+ "revision": "04ab5deb54538211f87d396072bacd6a4991b3e7",
+ "url": "https://github.com/nixos/nixpkgs/archive/04ab5deb54538211f87d396072bacd6a4991b3e7.tar.gz",
+ "hash": "sha256-iEliJjBpxRFCzemDtP9YtVkp3IpDHyOCZfctcCSev+g="
},
"unflake_github_nixos_nixpkgs_ref_nixpkgs-unstable": {
"type": "Git",
@@ -350,9 +349,9 @@
},
"branch": "nixpkgs-unstable",
"submodules": false,
- "revision": "4df1b885d76a54e1aa1a318f8d16fd6005b6401f",
- "url": "https://github.com/nixos/nixpkgs/archive/4df1b885d76a54e1aa1a318f8d16fd6005b6401f.tar.gz",
- "hash": "sha256-vhVhuXzFrIOfcssC/9hDHx7MHzDKjF3keHuREOQqQiQ="
+ "revision": "7525d999cd850b9a488817abc89c75dc733acf17",
+ "url": "https://github.com/nixos/nixpkgs/archive/7525d999cd850b9a488817abc89c75dc733acf17.tar.gz",
+ "hash": "sha256-4IHyyLgLBdKefkljdKod4IMn023pQiDXAWJA187cmdY="
},
"unflake_github_numtide_flake-utils": {
"type": "Git",
@@ -376,9 +375,9 @@
},
"branch": "main",
"submodules": false,
- "revision": "db947814a175b7ca6ded66e21383d938df01c227",
- "url": "https://github.com/numtide/treefmt-nix/archive/db947814a175b7ca6ded66e21383d938df01c227.tar.gz",
- "hash": "sha256-eynAfOmbmxJnkp7YewvCEbShNnnYJ9gLLqkzsYtBPeM="
+ "revision": "df3c0640565d04a0261253cdd89fce78ec50168a",
+ "url": "https://github.com/numtide/treefmt-nix/archive/df3c0640565d04a0261253cdd89fce78ec50168a.tar.gz",
+ "hash": "sha256-47cxbcZODibHv3rELFQ9vZly0vUNkND/atn/U7HLeb0="
},
"unflake_github_numtide_treefmt-nix_ref_main": {
"type": "Git",
@@ -389,9 +388,9 @@
},
"branch": "main",
"submodules": false,
- "revision": "db947814a175b7ca6ded66e21383d938df01c227",
- "url": "https://github.com/numtide/treefmt-nix/archive/db947814a175b7ca6ded66e21383d938df01c227.tar.gz",
- "hash": "sha256-eynAfOmbmxJnkp7YewvCEbShNnnYJ9gLLqkzsYtBPeM="
+ "revision": "df3c0640565d04a0261253cdd89fce78ec50168a",
+ "url": "https://github.com/numtide/treefmt-nix/archive/df3c0640565d04a0261253cdd89fce78ec50168a.tar.gz",
+ "hash": "sha256-47cxbcZODibHv3rELFQ9vZly0vUNkND/atn/U7HLeb0="
},
"unflake_github_oxalica_rust-overlay": {
"type": "Git",
@@ -402,9 +401,9 @@
},
"branch": "master",
"submodules": false,
- "revision": "7cc96a6a3fd6613cafd633250a3934483479b9a1",
- "url": "https://github.com/oxalica/rust-overlay/archive/7cc96a6a3fd6613cafd633250a3934483479b9a1.tar.gz",
- "hash": "sha256-CvRZn3Ut0scqLJ1xwQFkZwKGVBUUNBPrFVXRTMZpbfU="
+ "revision": "471286a5fadc690e2408ad854eb32325f5e74da7",
+ "url": "https://github.com/oxalica/rust-overlay/archive/471286a5fadc690e2408ad854eb32325f5e74da7.tar.gz",
+ "hash": "sha256-ZaS89rj5u6pygXKDRfCzPMGm7isJxLsSeIAR5EaSyu8="
},
"unflake_github_ryantm_agenix_ref_main": {
"type": "Git",
@@ -420,5 +419,5 @@
"hash": "sha256-9VnK6Oqai65puVJ4WYtCTvlJeXxMzAp/69HhQuTdl/I="
}
},
- "version": 7
+ "version": 8
}