aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-07-07 18:32:56 +0900
committerOphestra <cat@gensokyo.uk>2026-07-07 18:56:27 +0900
commit6d55ee536e902d059380f79e870d06547627cc7c (patch)
treeaacf3e3ec42525cf0e7a674aa948359fd0c21ae2
parentc8e8651694415d497b0800319b2ddda361b7651f (diff)
test: move nix files
These are too much clutter. Move them to test directory until the test suite replacement is upstreamed. Signed-off-by: Ophestra <cat@gensokyo.uk>
-rw-r--r--.gitea/workflows/release.yml2
-rw-r--r--.gitea/workflows/test.yml18
-rw-r--r--README.md7
-rw-r--r--test/default.nix2
-rw-r--r--test/flake.lock (renamed from flake.lock)0
-rw-r--r--test/flake.nix (renamed from flake.nix)22
-rw-r--r--test/hsu.nix (renamed from cmd/hsu/package.nix)2
-rw-r--r--test/interactive/raceattr.nix2
-rw-r--r--test/nixos.nix (renamed from nixos.nix)0
-rw-r--r--test/options.md (renamed from options.md)0
-rw-r--r--test/options.nix (renamed from options.nix)0
-rw-r--r--test/package.nix (renamed from package.nix)4
-rw-r--r--test/sandbox/default.nix2
-rw-r--r--test/sharefs/configuration.nix (renamed from cmd/sharefs/test/configuration.nix)0
-rw-r--r--test/sharefs/default.nix (renamed from cmd/sharefs/test/default.nix)0
-rw-r--r--test/sharefs/raceattr.go (renamed from cmd/sharefs/test/raceattr.go)0
-rw-r--r--test/sharefs/test.py (renamed from cmd/sharefs/test/test.py)0
17 files changed, 28 insertions, 33 deletions
diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml
index ac263704..134d8bd1 100644
--- a/.gitea/workflows/release.yml
+++ b/.gitea/workflows/release.yml
@@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@v4
- name: Build for release
- run: nix build --print-out-paths --print-build-logs .#dist
+ run: nix build --print-out-paths --print-build-logs ./test#dist
- name: Release
uses: https://gitea.com/actions/release-action@main
diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml
index 7066d0d4..d1fc7ef8 100644
--- a/.gitea/workflows/test.yml
+++ b/.gitea/workflows/test.yml
@@ -12,7 +12,7 @@ jobs:
uses: actions/checkout@v4
- name: Run NixOS test
- run: nix build --out-link "result" --print-out-paths --print-build-logs .#checks.x86_64-linux.hakurei
+ run: nix build --out-link "result" --print-out-paths --print-build-logs ./test#checks.x86_64-linux.hakurei
- name: Upload test output
uses: actions/upload-artifact@v3
@@ -29,7 +29,7 @@ jobs:
uses: actions/checkout@v4
- name: Run NixOS test
- run: nix build --out-link "result" --print-out-paths --print-build-logs .#checks.x86_64-linux.race
+ run: nix build --out-link "result" --print-out-paths --print-build-logs ./test#checks.x86_64-linux.race
- name: Upload test output
uses: actions/upload-artifact@v3
@@ -46,7 +46,7 @@ jobs:
uses: actions/checkout@v4
- name: Run NixOS test
- run: nix build --out-link "result" --print-out-paths --print-build-logs .#checks.x86_64-linux.sandbox
+ run: nix build --out-link "result" --print-out-paths --print-build-logs ./test#checks.x86_64-linux.sandbox
- name: Upload test output
uses: actions/upload-artifact@v3
@@ -63,7 +63,7 @@ jobs:
uses: actions/checkout@v4
- name: Run NixOS test
- run: nix build --out-link "result" --print-out-paths --print-build-logs .#checks.x86_64-linux.sandbox-race
+ run: nix build --out-link "result" --print-out-paths --print-build-logs ./test#checks.x86_64-linux.sandbox-race
- name: Upload test output
uses: actions/upload-artifact@v3
@@ -80,7 +80,7 @@ jobs:
uses: actions/checkout@v4
- name: Run NixOS test
- run: nix build --out-link "result" --print-out-paths --print-build-logs .#checks.x86_64-linux.sharefs
+ run: nix build --out-link "result" --print-out-paths --print-build-logs ./test#checks.x86_64-linux.sharefs
- name: Upload test output
uses: actions/upload-artifact@v3
@@ -103,7 +103,7 @@ jobs:
uses: actions/checkout@v4
- name: Run checks
- run: nix --print-build-logs --experimental-features 'nix-command flakes' flake check
+ run: nix --print-build-logs --experimental-features 'nix-command flakes' flake check ./test
dist:
name: Create distribution
@@ -116,9 +116,9 @@ jobs:
id: build-test
run: >-
export HAKUREI_REV="$(git rev-parse --short HEAD)" &&
- sed -i.old 's/version = /version = "0.0.0-'$HAKUREI_REV'"; # version = /' package.nix &&
- nix build --print-out-paths --print-build-logs .#dist &&
- mv package.nix.old package.nix &&
+ sed -i.old 's/version = /version = "0.0.0-'$HAKUREI_REV'"; # version = /' test/package.nix &&
+ nix build --print-out-paths --print-build-logs ./test#dist &&
+ mv test/{package.nix.old,package.nix} &&
echo "rev=$HAKUREI_REV" >> $GITHUB_OUTPUT
- name: Upload test build
diff --git a/README.md b/README.md
index 7375ba0b..15f4b095 100644
--- a/README.md
+++ b/README.md
@@ -57,9 +57,4 @@ package [internal/rosa](https://pkg.go.dev/hakurei.app/internal/rosa).
- [fuse](https://github.com/libfuse/libfuse) to implement the filesystem.
New dependencies will generally not be added. Patches adding new dependencies
-are very likely to be rejected.
-
-## NixOS Module (deprecated)
-
-The NixOS module is in maintenance mode and will be removed once planterette is
-feature-complete. Full module documentation can be found [here](options.md).
+are very likely to be rejected. \ No newline at end of file
diff --git a/test/default.nix b/test/default.nix
index 76a490a7..81daa0a2 100644
--- a/test/default.nix
+++ b/test/default.nix
@@ -54,7 +54,7 @@ testers.nixosTest {
# Run with Go race detector:
environment.hakurei = lib.mkIf withRace rec {
# race detector does not support static linking
- package = (pkgs.callPackage ../package.nix { }).overrideAttrs (previousAttrs: {
+ package = (pkgs.callPackage ./package.nix { }).overrideAttrs (previousAttrs: {
env = previousAttrs.env // {
GOFLAGS = previousAttrs.env.GOFLAGS + " -race";
};
diff --git a/flake.lock b/test/flake.lock
index ce9fe45f..ce9fe45f 100644
--- a/flake.lock
+++ b/test/flake.lock
diff --git a/flake.nix b/test/flake.nix
index 92548b40..6c8cf100 100644
--- a/flake.nix
+++ b/test/flake.nix
@@ -43,19 +43,19 @@
;
in
{
- hakurei = callPackage ./test { inherit system self; };
- race = callPackage ./test {
+ hakurei = callPackage ./. { inherit system self; };
+ race = callPackage ./. {
inherit system self;
withRace = true;
};
- sandbox = callPackage ./test/sandbox { inherit self; };
- sandbox-race = callPackage ./test/sandbox {
+ sandbox = callPackage ./sandbox { inherit self; };
+ sandbox-race = callPackage ./sandbox {
inherit self;
withRace = true;
};
- sharefs = callPackage ./cmd/sharefs/test { inherit system self; };
+ sharefs = callPackage ./sharefs { inherit system self; };
formatting = runCommandLocal "check-formatting" { nativeBuildInputs = [ nixfmt ]; } ''
cd ${./.}
@@ -116,7 +116,7 @@
nettools
;
};
- hsu = pkgs.callPackage ./cmd/hsu/package.nix { inherit (self.packages.${system}) hakurei; };
+ hsu = pkgs.callPackage ./hsu.nix { inherit (self.packages.${system}) hakurei; };
sharefs = pkgs.linkFarm "sharefs" {
"bin/sharefs" = "${hakurei}/libexec/sharefs";
"bin/mount.fuse.sharefs" = "${hakurei}/libexec/sharefs";
@@ -190,11 +190,11 @@
};
}
- ./test/interactive/configuration.nix
- ./test/interactive/vm.nix
- ./test/interactive/hakurei.nix
- ./test/interactive/trace.nix
- ./test/interactive/raceattr.nix
+ ./interactive/configuration.nix
+ ./interactive/vm.nix
+ ./interactive/hakurei.nix
+ ./interactive/trace.nix
+ ./interactive/raceattr.nix
self.nixosModules.hakurei
home-manager.nixosModules.home-manager
diff --git a/cmd/hsu/package.nix b/test/hsu.nix
index 6075cdb1..7acb3529 100644
--- a/cmd/hsu/package.nix
+++ b/test/hsu.nix
@@ -8,7 +8,7 @@ buildGoModule {
pname = "${hakurei.pname}-hsu";
inherit (hakurei) version;
- src = ./.;
+ src = ../cmd/hsu;
inherit (hakurei) vendorHash;
env.CGO_ENABLED = 0;
diff --git a/test/interactive/raceattr.nix b/test/interactive/raceattr.nix
index d94d7a7b..de54f4cf 100644
--- a/test/interactive/raceattr.nix
+++ b/test/interactive/raceattr.nix
@@ -16,7 +16,7 @@
src = builtins.path {
name = "${pname}-src";
- path = lib.cleanSource ../../cmd/sharefs/test;
+ path = lib.cleanSource ../sharefs;
filter = path: type: (type == "directory") || (type == "regular" && lib.hasSuffix ".go" path);
};
vendorHash = null;
diff --git a/nixos.nix b/test/nixos.nix
index 49bfffb6..49bfffb6 100644
--- a/nixos.nix
+++ b/test/nixos.nix
diff --git a/options.md b/test/options.md
index 6f6acddd..6f6acddd 100644
--- a/options.md
+++ b/test/options.md
diff --git a/options.nix b/test/options.nix
index f624b6f5..f624b6f5 100644
--- a/options.nix
+++ b/test/options.nix
diff --git a/package.nix b/test/package.nix
index d426bf6c..46567b69 100644
--- a/package.nix
+++ b/test/package.nix
@@ -34,11 +34,11 @@
buildGo126Module rec {
pname = "hakurei";
- version = with lib.strings; removePrefix "v" (trim (builtins.readFile ./cmd/dist/VERSION));
+ version = with lib.strings; removePrefix "v" (trim (builtins.readFile ../cmd/dist/VERSION));
srcFiltered = builtins.path {
name = "${pname}-src";
- path = lib.cleanSource ./.;
+ path = lib.cleanSource ../.;
filter = path: type: !(type == "regular" && (lib.hasSuffix ".nix" path || lib.hasSuffix ".py" path)) && !(type == "directory" && lib.hasSuffix "/test" path) && !(type == "directory" && lib.hasSuffix "/cmd/hsu" path);
};
vendorHash = null;
diff --git a/test/sandbox/default.nix b/test/sandbox/default.nix
index a0b8d13a..47a59de9 100644
--- a/test/sandbox/default.nix
+++ b/test/sandbox/default.nix
@@ -14,7 +14,7 @@ testers.nixosTest {
# Run with Go race detector:
environment.hakurei = lib.mkIf withRace rec {
# race detector does not support static linking
- package = (pkgs.callPackage ../../package.nix { }).overrideAttrs (previousAttrs: {
+ package = (pkgs.callPackage ../package.nix { }).overrideAttrs (previousAttrs: {
env = previousAttrs.env // {
GOFLAGS = previousAttrs.env.GOFLAGS + " -race";
};
diff --git a/cmd/sharefs/test/configuration.nix b/test/sharefs/configuration.nix
index 05d67dcb..05d67dcb 100644
--- a/cmd/sharefs/test/configuration.nix
+++ b/test/sharefs/configuration.nix
diff --git a/cmd/sharefs/test/default.nix b/test/sharefs/default.nix
index e963eaa6..e963eaa6 100644
--- a/cmd/sharefs/test/default.nix
+++ b/test/sharefs/default.nix
diff --git a/cmd/sharefs/test/raceattr.go b/test/sharefs/raceattr.go
index 412cb2b3..412cb2b3 100644
--- a/cmd/sharefs/test/raceattr.go
+++ b/test/sharefs/raceattr.go
diff --git a/cmd/sharefs/test/test.py b/test/sharefs/test.py
index 4b925c9c..4b925c9c 100644
--- a/cmd/sharefs/test/test.py
+++ b/test/sharefs/test.py