diff --git a/nt/default.nix b/nt/default.nix index c03e0be..89c329f 100644 --- a/nt/default.nix +++ b/nt/default.nix @@ -5,6 +5,5 @@ mix.newMixture inputs (mixture: { ]; submods.public = [ ./mix - ./units ]; }) diff --git a/nt/units/README.md b/nt/units/README.md deleted file mode 100644 index 5ca105a..0000000 --- a/nt/units/README.md +++ /dev/null @@ -1 +0,0 @@ -# Unit Testing For Nix diff --git a/nt/units/default.nix b/nt/units/default.nix deleted file mode 100644 index c3d4bad..0000000 --- a/nt/units/default.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ - flake, - this, - ... -}: let - inherit - (builtins) - derivation - getFlake - ; - - inherit - (this) - genAttrs - ; - - # TODO: rewrite nix-unit to lose dependency - nix-unit-flake = getFlake "github.com:nix-community/nix-unit?rev=5e224c19c7087daebb7f7ac95acdfdcc08ea7433"; - - forAllSystems = genAttrs [ - "aarch64-darwin" - "aarch64-linux" - "x86_64-darwin" - "x86_64-linux" - ]; -in { - tests.testPass = { - expr = 3; - expected = 4; - }; - - checks = forAllSystems (system: let - nix-unit = "${nix-unit-flake.packages.${system}.default}/bin/nix-unit"; - in { - default = derivation { - inherit system; - name = "nt-units"; - builder = "/bin/sh"; - - args = [ - "-c" - ''export HOME="$(realpath .)"; ${nix-unit} --eval-store "$HOME" --flake ${flake}#tests --extra-experimental-features flakes --extra-experimental-features nix-command --extra-experimental-features pipe-operators; touch $out'' - ]; - - # XXX: TODO: is nix-unit-flake built in the sandbox (probably not right?) - # fixed-output-derivation by using output* options - # outputHashMode = "flat"; - # outputHashAlgo = "sha256"; - # outputHash = ""; - }; - }); -}