-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
57c2796
commit 5d15941
Showing
85 changed files
with
2,026 additions
and
1,928 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,38 @@ | ||
{ system ? builtins.currentSystem | ||
, inputs ? (import ../.).inputs | ||
}: | ||
let | ||
|
||
{ | ||
system ? builtins.currentSystem, | ||
inputs ? (import ../.).inputs, | ||
}: let | ||
inherit (inputs) digga nixpkgs; | ||
lib = nixpkgs.lib // digga.lib; | ||
pkgs = nixpkgs.legacyPackages.${system}; | ||
|
||
in | ||
{ | ||
|
||
libTests = pkgs.runCommandNoCC "devos-lib-tests" | ||
in { | ||
libTests = | ||
pkgs.runCommandNoCC "devos-lib-tests" | ||
{ | ||
buildInputs = [ | ||
pkgs.nix | ||
( | ||
let tests = import ./lib { inherit pkgs lib; }; in | ||
if tests == [ ] then null | ||
else throw (builtins.toJSON tests) | ||
let | ||
tests = import ./lib {inherit pkgs lib;}; | ||
in | ||
if tests == [] | ||
then null | ||
else throw (builtins.toJSON tests) | ||
) | ||
]; | ||
} '' | ||
datadir="${pkgs.nix}/share" | ||
export TEST_ROOT=$(pwd)/test-tmp | ||
export NIX_BUILD_HOOK= | ||
export NIX_CONF_DIR=$TEST_ROOT/etc | ||
export NIX_LOCALSTATE_DIR=$TEST_ROOT/var | ||
export NIX_LOG_DIR=$TEST_ROOT/var/log/nix | ||
export NIX_STATE_DIR=$TEST_ROOT/var/nix | ||
export NIX_STORE_DIR=$TEST_ROOT/store | ||
export PAGER=cat | ||
cacheDir=$TEST_ROOT/binary-cache | ||
nix-store --init | ||
touch $out | ||
''; | ||
datadir="${pkgs.nix}/share" | ||
export TEST_ROOT=$(pwd)/test-tmp | ||
export NIX_BUILD_HOOK= | ||
export NIX_CONF_DIR=$TEST_ROOT/etc | ||
export NIX_LOCALSTATE_DIR=$TEST_ROOT/var | ||
export NIX_LOG_DIR=$TEST_ROOT/var/log/nix | ||
export NIX_STATE_DIR=$TEST_ROOT/var/nix | ||
export NIX_STORE_DIR=$TEST_ROOT/store | ||
export PAGER=cat | ||
cacheDir=$TEST_ROOT/binary-cache | ||
nix-store --init | ||
touch $out | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
{ pkgs, lib }: | ||
{ | ||
pkgs, | ||
lib, | ||
}: | ||
with lib; | ||
lib.runTests { | ||
testRakeLeaves = { | ||
expr = rakeLeaves ./profiles; | ||
expected = { | ||
f = ./profiles/f.nix; | ||
foo = ./profiles/foo; | ||
t = { | ||
bar = ./profiles/t/bar.nix; | ||
lib.runTests { | ||
testRakeLeaves = { | ||
expr = rakeLeaves ./profiles; | ||
expected = { | ||
f = ./profiles/f.nix; | ||
foo = ./profiles/foo; | ||
t = { | ||
bar = ./profiles/t/bar.nix; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
testFlattenTree = { | ||
expr = flattenTree (rakeLeaves ./profiles); | ||
expected = { | ||
f = ./profiles/f.nix; | ||
foo = ./profiles/foo; | ||
"t.bar" = ./profiles/t/bar.nix; | ||
testFlattenTree = { | ||
expr = flattenTree (rakeLeaves ./profiles); | ||
expected = { | ||
f = ./profiles/f.nix; | ||
foo = ./profiles/foo; | ||
"t.bar" = ./profiles/t/bar.nix; | ||
}; | ||
}; | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{ } | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{ } | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,22 @@ | ||
let | ||
inherit (import | ||
( | ||
let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in | ||
fetchTarball { | ||
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; | ||
sha256 = lock.nodes.flake-compat.locked.narHash; | ||
} | ||
) | ||
{ src = ./.; }) defaultNix; | ||
inherit | ||
(import | ||
( | ||
let | ||
lock = builtins.fromJSON (builtins.readFile ./flake.lock); | ||
in | ||
fetchTarball { | ||
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; | ||
sha256 = lock.nodes.flake-compat.locked.narHash; | ||
} | ||
) | ||
{src = ./.;}) | ||
defaultNix | ||
; | ||
in | ||
# Pass this flake as inputs.digga | ||
defaultNix // { | ||
inputs = defaultNix.inputs // { digga = defaultNix; }; | ||
shell = import ./devShell.nix { }; | ||
} | ||
|
||
# Pass this flake as inputs.digga | ||
defaultNix | ||
// { | ||
inputs = defaultNix.inputs // {digga = defaultNix;}; | ||
shell = import ./devShell.nix {}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
{ lib, importers }: | ||
{ | ||
lib, | ||
importers, | ||
}: | ||
lib.warn '' | ||
You are accessing a deprecated item of the digga lib. | ||
Please update timely, it will be remove soon. | ||
'' | ||
rec { | ||
|
||
importModules = | ||
lib.warn '' | ||
Deprecated Function: lib.importModules. | ||
Use lib.importExportableModules instead to set `exportedModules` option | ||
'' | ||
importers.importExportableModules; | ||
|
||
importers.importExportableModules; | ||
} |
Oops, something went wrong.