Skip to content

Commit

Permalink
Truth: Base
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal-Atlas committed Oct 26, 2023
1 parent d29ed68 commit 07e260d
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,9 @@ <h4>Lock file</h4>
</code>
</pre>
</section>
<section data-background-iframe="https://nixos.org/manual/nix/unstable/language/derivations.html"
data-background-interactive>
</section>
<section>
Where do I output the build?
<br></br> <br></br>
Expand Down
1 change: 1 addition & 0 deletions the-truth/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
26 changes: 26 additions & 0 deletions the-truth/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions the-truth/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
inputs.nixpkgs.url = "github:NixOs/nixpkgs";

outputs = { nixpkgs, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in {
packages.${system} = {
isolation = builtins.derivation {
name = "isolation";
builder = "${pkgs.bash}/bin/bash";
args = [
(builtins.toFile "builder.sh" ''
set -euox pipefail;
mkdir "$out";
env > "$out/env";
ls /nix/store > "$out/visible-store";
'')
];
PATH = "${pkgs.coreutils}/bin";
inherit system;
};
unworth = builtins.derivation {
name = "unworth";
builder = "${pkgs.bash}/bin/bash";
args = [
(builtins.toFile "builder.sh" ''
exit 1
'')
];
inherit system;
};
sloth = builtins.derivation {
name = "sloth";
builder = "${pkgs.bash}/bin/bash";
args = [
(builtins.toFile "builder.sh" ''
exit 0
'')
];
inherit system;
};
};
};
}

0 comments on commit 07e260d

Please sign in to comment.