mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-24 15:01:56 +03:00
33 lines
463 B
Nix
33 lines
463 B
Nix
{
|
|
pkgs,
|
|
utils,
|
|
...
|
|
}: {
|
|
inputs = [
|
|
"owner"
|
|
"repo"
|
|
"rev"
|
|
];
|
|
|
|
versionField = "rev";
|
|
|
|
outputs = {
|
|
owner,
|
|
repo,
|
|
rev,
|
|
...
|
|
}: let
|
|
b = builtins;
|
|
in {
|
|
calcHash = algo:
|
|
utils.hashPath algo (b.fetchTarball {
|
|
url = "https://gitlab.com/${owner}/${repo}/-/archive/${rev}/${repo}-${rev}.tar.gz";
|
|
});
|
|
|
|
fetched = hash:
|
|
pkgs.fetchFromGitLab {
|
|
inherit owner repo rev hash;
|
|
};
|
|
};
|
|
}
|