Add shell.nix
This commit is contained in:
parent
ab9a40dc27
commit
de4e7a02e9
2
dep/nix-daml-sdk/default.nix
Normal file
2
dep/nix-daml-sdk/default.nix
Normal file
@ -0,0 +1,2 @@
|
||||
# DO NOT HAND-EDIT THIS FILE
|
||||
import (import ./thunk.nix)
|
7
dep/nix-daml-sdk/git.json
Normal file
7
dep/nix-daml-sdk/git.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"url": "ssh://git@code.obsidian.systems/daml/nix-daml-sdk",
|
||||
"rev": "b29698abd21bdfe1e0ab96271c0c7189e90f05dd",
|
||||
"sha256": "1y9ak1vdyplqk2c6www9h75yqks58q6iwyv7py0c700vyav8wk51",
|
||||
"private": true,
|
||||
"fetchSubmodules": false
|
||||
}
|
17
dep/nix-daml-sdk/thunk.nix
Normal file
17
dep/nix-daml-sdk/thunk.nix
Normal file
@ -0,0 +1,17 @@
|
||||
# DO NOT HAND-EDIT THIS FILE
|
||||
let fetch = {url, rev, branch ? null, sha256 ? null, fetchSubmodules ? false, private ? false, ...}:
|
||||
let realUrl = let firstChar = builtins.substring 0 1 url; in
|
||||
if firstChar == "/" then /. + url
|
||||
else if firstChar == "." then ./. + url
|
||||
else url;
|
||||
in if !fetchSubmodules && private then builtins.fetchGit {
|
||||
url = realUrl; inherit rev;
|
||||
${if branch == null then null else "ref"} = branch;
|
||||
} else (import (builtins.fetchTarball {
|
||||
url = "https://github.com/NixOS/nixpkgs/archive/3aad50c30c826430b0270fcf8264c8c41b005403.tar.gz";
|
||||
sha256 = "0xwqsf08sywd23x0xvw4c4ghq0l28w2ki22h0bdn766i16z9q2gr";
|
||||
}) {}).fetchgit {
|
||||
url = realUrl; inherit rev sha256;
|
||||
};
|
||||
json = builtins.fromJSON (builtins.readFile ./git.json);
|
||||
in fetch json
|
2
dep/nix-thunk/default.nix
Normal file
2
dep/nix-thunk/default.nix
Normal file
@ -0,0 +1,2 @@
|
||||
# DO NOT HAND-EDIT THIS FILE
|
||||
import (import ./thunk.nix)
|
7
dep/nix-thunk/github.json
Normal file
7
dep/nix-thunk/github.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"owner": "obsidiansystems",
|
||||
"repo": "nix-thunk",
|
||||
"private": false,
|
||||
"rev": "0982911d78fbd9932c3ed8104a930f313f49b69b",
|
||||
"sha256": "130n8mzywbvyqd6aap6yk98zynq3r3kpj2hfzdym26plwz0rr3bj"
|
||||
}
|
12
dep/nix-thunk/thunk.nix
Normal file
12
dep/nix-thunk/thunk.nix
Normal file
@ -0,0 +1,12 @@
|
||||
# DO NOT HAND-EDIT THIS FILE
|
||||
let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
|
||||
if !fetchSubmodules && !private then builtins.fetchTarball {
|
||||
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
|
||||
} else (import (builtins.fetchTarball {
|
||||
url = "https://github.com/NixOS/nixpkgs/archive/3aad50c30c826430b0270fcf8264c8c41b005403.tar.gz";
|
||||
sha256 = "0xwqsf08sywd23x0xvw4c4ghq0l28w2ki22h0bdn766i16z9q2gr";
|
||||
}) {}).fetchFromGitHub {
|
||||
inherit owner repo rev sha256 fetchSubmodules private;
|
||||
};
|
||||
json = builtins.fromJSON (builtins.readFile ./github.json);
|
||||
in fetch json
|
Loading…
Reference in New Issue
Block a user