Skip to content

Commit

Permalink
feat(cross): fluidattacks#1202 use fetch tarball
Browse files Browse the repository at this point in the history
- Use fetch tarball in builtins
- Use fetch tarball in documentation

Signed-off-by: Daniel Salazar <[email protected]>
  • Loading branch information
dsalaza4 committed Dec 19, 2023
1 parent 9aaa28e commit a56f0f6
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .mailmap
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Andres Cuberos <[email protected]> Andres Cuberos <[email protected]>
Andres Cuberos <[email protected]> Andres Cuberos <acuberos@fluidttacks.com>
Andres Cuberos <[email protected]> Andres Cuberos <acuberos@fluidattacks.com>
Daniel Murcia <[email protected]> Daniel F. Murcia Rivera <[email protected]>
Daniel Murcia <[email protected]> Daniel Murcia <[email protected]>
Daniel Salazar <[email protected]> Daniel Salazar <[email protected]>
Expand Down
3 changes: 2 additions & 1 deletion docs/src/api/builtins/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ Example:

```nix
{
computeOnAwsBatch,
outputs,
...
}: {
Expand All @@ -103,7 +104,7 @@ Example:
];
tags = {
"Management:Product" = "awesome_app";
}
};
vcpus = 1;
};
};
Expand Down
7 changes: 3 additions & 4 deletions docs/src/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,9 @@ You can also import Makes from Nix:
```nix
let
# Import the framework
makes = import "${builtins.fetchGit {
url = "https://github.com/fluidattacks/makes";
ref = "refs/tags/24.01";
rev = ""; # Add a commit here
makes = import "${builtins.fetchTarball {
sha256 = ""; # Tarball sha256
url = "https://api.github.com/repos/fluidattacks/makes/tarball/24.01";
}}/src/args/agnostic.nix" { };
in
# Use the framework
Expand Down
14 changes: 10 additions & 4 deletions docs/src/versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,20 @@ for instance:
```nix
# /path/to/my/project/makes.lock.nix
{
makesSrc = builtins.fetchGit {
url = "https://github.com/fluidattacks/makes";
ref = "refs/tags/24.01";
rev = ""; # Add a commit here
makesSrc = builtins.fetchTarball {
sha256 = ""; # Tarball sha256
url = "https://api.github.com/repos/fluidattacks/makes/tarball/24.01";
};
}
```

???+ tip

We recommend using `builtins.fetchTarball`
over `builtins.fetchGit`
due to reproducibility issues
mentioned in [nixpkgs](https://github.com/NixOS/nix/issues/3533).

## Compatibility information

For the whole ecosystem to work
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
nixpkgs,
python_version,
}: let
src = builtins.fetchGit {
url = "https://gitlab.com/dmurciaatfluid/arch_lint";
rev = "72a495bb933f052ad812292b468ca3e18fd9dde4";
ref = "refs/tags/2.4.0+1";
commit = "72a495bb933f052ad812292b468ca3e18fd9dde4";
src = builtins.fetchTarball {
sha256 = "sha256:0413zl4y92dbdfmck070x7dhp5cxx66xd2pxpxg3gbhaw0yqzhqd";
url = "https://gitlab.com/dmurciaatfluid/arch_lint/-/archive/${commit}/arch_lint-${commit}.tar";
};
in
import "${src}/build" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
nixpkgs,
python_version,
}: let
src = builtins.fetchGit {
url = "https://gitlab.com/dmurciaatfluid/purity";
rev = "e0b5cf459a16eb92d86ca6c024edbedd52d72589";
ref = "refs/tags/v1.38.0";
commit = "e0b5cf459a16eb92d86ca6c024edbedd52d72589";
src = builtins.fetchTarball {
sha256 = "sha256:08h1b94mn74lqz47cj8m5dmm5xddddfd1clrb6zqi898w3q1bylr";
url = "https://gitlab.com/dmurciaatfluid/purity/-/archive/${commit}/purity-${commit}.tar";
};
in
import "${src}/build" {
Expand Down
6 changes: 3 additions & 3 deletions src/args/compute-on-aws-batch/batch-client/entrypoint.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
nixpkgs,
}: let
nix-filter = let
src = builtins.fetchGit {
url = "https://github.com/numtide/nix-filter";
rev = "fc282c5478e4141842f9644c239a41cfe9586732";
src = builtins.fetchTarball {
sha256 = "sha256:155cmq1w8s5v2l4d5zlhbph8r4fh0k2cl503z94ma7yizmmx9ll5";
url = "https://api.github.com/repos/numtide/nix-filter/tarball/fc282c5478e4141842f9644c239a41cfe9586732";
};
in
import src;
Expand Down

0 comments on commit a56f0f6

Please sign in to comment.