-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
52 lines (45 loc) · 1.51 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{
description = "This is a nix flake package";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.podman-rootless.url = "github:ES-Nix/podman-rootless";
inputs.hello.url = "github:GNU-ES/hello";
outputs = { self, nixpkgs, flake-utils, podman-rootless, hello }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
#
#pkgsAllowUnfree = import nixpkgs {
# system = "x86_64-linux";
# config = { allowUnfree = true; };
#};
testScriptInFlake = pkgs.writeShellScriptBin "test_script_in_flake" ''
#!${nixpkgs.legacyPackages.${system}.stdenv.shell}
echo 'From echo in flake.nix file'
'';
in
{
#packages.mywrapper = import ./wrapper.nix {
# pkgs = pkgs;
#};
#defaultPackage = self.packages.${system}.mywrapper;
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
# Why does not work?
#podman-rootless.packages.${system}.mypodman
podman-rootless.defaultPackage.${system}
testScriptInFlake
hello.defaultPackage.${system}
];
shellHook = ''
# TODO: document why this.
export TMPDIR=/tmp
echo 'Entering the nix + flake devShell example!'
test_script_in_flake
sometool-setup-script
hello
podman-setup-script
podman-capabilities
'';
};
});
}