aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.gitea/workflows/test.yml2
-rwxr-xr-xext/mksysnum_linux.pl2
-rw-r--r--internal/workflows/step.go2
-rw-r--r--internal/workflows/test.go26
-rw-r--r--test/flake.nix167
-rw-r--r--test/hakurei/configuration.nix (renamed from test/configuration.nix)0
-rw-r--r--test/hakurei/default.nix (renamed from test/default.nix)0
-rw-r--r--test/hakurei/flake.lock (renamed from test/flake.lock)0
-rw-r--r--test/hakurei/flake.nix76
-rw-r--r--test/hakurei/hsu.nix (renamed from test/hsu.nix)2
-rw-r--r--test/hakurei/nixos.nix (renamed from test/nixos.nix)0
-rw-r--r--test/hakurei/options.nix (renamed from test/options.nix)0
-rw-r--r--test/hakurei/package.nix (renamed from test/package.nix)4
-rw-r--r--test/hakurei/test.py (renamed from test/test.py)0
14 files changed, 84 insertions, 197 deletions
diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml
index e4736310..099a3c98 100644
--- a/.gitea/workflows/test.yml
+++ b/.gitea/workflows/test.yml
@@ -1 +1 @@
-{"name":"Test","on":["push"],"jobs":{"hakurei":{"name":"Hakurei (legacy)","runs-on":"nix","steps":[{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Run NixOS test","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","with":{"name":"hakurei-vm-output","path":"result/*","retention-days":1}}]},"race":{"name":"Hakurei (legacy with race instrument)","runs-on":"nix","steps":[{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Run NixOS test","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","with":{"name":"hakurei-race-vm-output","path":"result/*","retention-days":1}}]},"sandbox":{"name":"Sandbox","runs-on":"rosa","steps":[{"name":"Fix container filesystem","run":"rm /var/run \u0026\u0026 ln -sf ../run /var"},{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Set up Go toolchain","uses":"actions/setup-go@v6","with":{"go-version-file":"go.mod"}},{"name":"Install packages","uses":"awalsh128/cache-apt-pkgs-action@v1","with":{"add-repository":"ppa:savoury1/pipewire","packages":"libmount-dev sway xwayland xdg-dbus-proxy pipewire","version":0,"execute_install_scripts":true}},{"name":"Request distribution","id":"dist","run":"HAKUREI_REV=\"$(git rev-parse --short HEAD)\" \u0026\u0026 /rosa/bin/mbf ci dist -o result . \"$(cat cmd/dist/VERSION)-$HAKUREI_REV\" \u0026\u0026 echo \"rev=$HAKUREI_REV\" \u003e\u003e \"$GITHUB_OUTPUT\""},{"name":"Install hakurei","run":"HAKUREI_VERSION=\"$(cat cmd/dist/VERSION)-${{ steps.dist.outputs.rev }}\" \u0026\u0026 tar xf result/hakurei-$HAKUREI_VERSION*-amd64.tar.gz \u0026\u0026 ./hakurei-$HAKUREI_VERSION*-amd64/install.sh \u0026\u0026 sudo -u ubuntu hakurei version \u0026\u0026 mkdir /var/empty"},{"name":"Compile and run test suite","run":"rm -rf result \u0026\u0026 go run -tags=testsuite ./test/sandbox"}]},"sandbox-race":{"name":"Sandbox (with race instrument)","runs-on":"rosa","steps":[{"name":"Fix container filesystem","run":"rm /var/run \u0026\u0026 ln -sf ../run /var"},{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Set up Go toolchain","uses":"actions/setup-go@v6","with":{"go-version-file":"go.mod"}},{"name":"Install packages","uses":"awalsh128/cache-apt-pkgs-action@v1","with":{"add-repository":"ppa:savoury1/pipewire","packages":"libmount-dev sway xwayland xdg-dbus-proxy pipewire","version":0,"execute_install_scripts":true}},{"name":"Request distribution","id":"dist","run":"HAKUREI_REV=\"$(git rev-parse --short HEAD)\" \u0026\u0026 /rosa/bin/mbf ci race -o result . \"$(cat cmd/dist/VERSION)-$HAKUREI_REV\" \u0026\u0026 echo \"rev=$HAKUREI_REV\" \u003e\u003e \"$GITHUB_OUTPUT\""},{"name":"Install hakurei","run":"HAKUREI_VERSION=\"$(cat cmd/dist/VERSION)-${{ steps.dist.outputs.rev }}\" \u0026\u0026 tar xf result/hakurei-$HAKUREI_VERSION*-amd64.tar.gz \u0026\u0026 ./hakurei-$HAKUREI_VERSION*-amd64/install.sh \u0026\u0026 sudo -u ubuntu hakurei version \u0026\u0026 mkdir /var/empty"},{"name":"Compile and run test suite","run":"rm -rf result \u0026\u0026 go run -tags=testsuite ./test/sandbox"}]},"sharefs":{"name":"ShareFS","runs-on":"rosa","steps":[{"name":"Fix container filesystem","run":"rm /var/run \u0026\u0026 ln -sf ../run /var"},{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Set up Go toolchain","uses":"actions/setup-go@v6","with":{"go-version-file":"go.mod"}},{"name":"Install packages","uses":"awalsh128/cache-apt-pkgs-action@v1","with":{"add-repository":"","packages":"fuse3 fsmark","version":0,"execute_install_scripts":true}},{"name":"Request distribution","id":"dist","run":"HAKUREI_REV=\"$(git rev-parse --short HEAD)\" \u0026\u0026 /rosa/bin/mbf ci dist -o result . \"$(cat cmd/dist/VERSION)-$HAKUREI_REV\" \u0026\u0026 echo \"rev=$HAKUREI_REV\" \u003e\u003e \"$GITHUB_OUTPUT\""},{"name":"Install hakurei","run":"HAKUREI_VERSION=\"$(cat cmd/dist/VERSION)-${{ steps.dist.outputs.rev }}\" \u0026\u0026 tar xf result/hakurei-$HAKUREI_VERSION*-amd64.tar.gz \u0026\u0026 ./hakurei-$HAKUREI_VERSION*-amd64/install.sh \u0026\u0026 sudo -u ubuntu hakurei version \u0026\u0026 mkdir /var/empty"},{"name":"Mount sharefs","run":"useradd -ru 1023 -md /var/lib/sdcard -k /var/empty -s /sbin/nologin media_rw \u0026\u0026 install -dm0 /sdcard \u0026\u0026 sharefs -o rw,noexec,nosuid,nodev,noatime,allow_other,mkdir,source=/var/lib/sdcard,setuid=1023,setgid=1023 /sdcard"},{"name":"Compile and run test suite","run":"sharefs -V \u0026\u0026 rm -rf result \u0026\u0026 go run -tags=testsuite ./test/sharefs"},{"name":"Upload test output","uses":"actions/upload-artifact@v3","with":{"name":"fs_mark","path":"result/*","retention-days":1}}]},"check":{"name":"Flake checks","needs":["hakurei","race"],"runs-on":"nix","steps":[{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Run checks","run":"nix --print-build-logs --experimental-features 'nix-command flakes' flake check ./test"}]},"dist":{"name":"Create distribution","runs-on":"rosa","steps":[{"name":"Fix container filesystem","run":"rm /var/run \u0026\u0026 ln -sf ../run /var"},{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Request distribution","id":"dist-test","run":"HAKUREI_REV=\"$(git rev-parse --short HEAD)\" \u0026\u0026 /rosa/bin/mbf ci dist -o result . \"$(cat cmd/dist/VERSION)-$HAKUREI_REV\" \u0026\u0026 echo \"rev=$HAKUREI_REV\" \u003e\u003e \"$GITHUB_OUTPUT\""},{"name":"Upload distribution","uses":"actions/upload-artifact@v3","with":{"name":"dist-${{ steps.dist-test.outputs.rev }}","path":"result/*","retention-days":1}}]}}}
+{"name":"Test","on":["push"],"jobs":{"hakurei-legacy":{"name":"Hakurei (legacy)","runs-on":"nix","steps":[{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Run NixOS test","run":"nix build --out-link result --print-out-paths --print-build-logs ./test/hakurei#checks.x86_64-linux.hakurei"},{"name":"Upload test output","uses":"actions/upload-artifact@v3","with":{"name":"hakurei-vm-output","path":"result/*","retention-days":1}}]},"hakurei-race-legacy":{"name":"Hakurei (legacy with race instrument)","runs-on":"nix","steps":[{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Run NixOS test","run":"nix build --out-link result --print-out-paths --print-build-logs ./test/hakurei#checks.x86_64-linux.race"},{"name":"Upload test output","uses":"actions/upload-artifact@v3","with":{"name":"hakurei-race-vm-output","path":"result/*","retention-days":1}}]},"sandbox":{"name":"Sandbox","runs-on":"rosa","steps":[{"name":"Fix container filesystem","run":"rm /var/run \u0026\u0026 ln -sf ../run /var"},{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Set up Go toolchain","uses":"actions/setup-go@v6","with":{"go-version-file":"go.mod"}},{"name":"Install packages","uses":"awalsh128/cache-apt-pkgs-action@v1","with":{"add-repository":"ppa:savoury1/pipewire","packages":"libmount-dev sway xwayland xdg-dbus-proxy pipewire","version":0,"execute_install_scripts":true}},{"name":"Request distribution","id":"dist","run":"HAKUREI_REV=\"$(git rev-parse --short HEAD)\" \u0026\u0026 /rosa/bin/mbf ci dist -o result . \"$(cat cmd/dist/VERSION)-$HAKUREI_REV\" \u0026\u0026 echo \"rev=$HAKUREI_REV\" \u003e\u003e \"$GITHUB_OUTPUT\""},{"name":"Install hakurei","run":"HAKUREI_VERSION=\"$(cat cmd/dist/VERSION)-${{ steps.dist.outputs.rev }}\" \u0026\u0026 tar xf result/hakurei-$HAKUREI_VERSION*-amd64.tar.gz \u0026\u0026 ./hakurei-$HAKUREI_VERSION*-amd64/install.sh \u0026\u0026 sudo -u ubuntu hakurei version \u0026\u0026 mkdir /var/empty"},{"name":"Compile and run test suite","run":"rm -rf result \u0026\u0026 go run -tags=testsuite ./test/sandbox"}]},"sandbox-race":{"name":"Sandbox (with race instrument)","runs-on":"rosa","steps":[{"name":"Fix container filesystem","run":"rm /var/run \u0026\u0026 ln -sf ../run /var"},{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Set up Go toolchain","uses":"actions/setup-go@v6","with":{"go-version-file":"go.mod"}},{"name":"Install packages","uses":"awalsh128/cache-apt-pkgs-action@v1","with":{"add-repository":"ppa:savoury1/pipewire","packages":"libmount-dev sway xwayland xdg-dbus-proxy pipewire","version":0,"execute_install_scripts":true}},{"name":"Request distribution","id":"dist","run":"HAKUREI_REV=\"$(git rev-parse --short HEAD)\" \u0026\u0026 /rosa/bin/mbf ci race -o result . \"$(cat cmd/dist/VERSION)-$HAKUREI_REV\" \u0026\u0026 echo \"rev=$HAKUREI_REV\" \u003e\u003e \"$GITHUB_OUTPUT\""},{"name":"Install hakurei","run":"HAKUREI_VERSION=\"$(cat cmd/dist/VERSION)-${{ steps.dist.outputs.rev }}\" \u0026\u0026 tar xf result/hakurei-$HAKUREI_VERSION*-amd64.tar.gz \u0026\u0026 ./hakurei-$HAKUREI_VERSION*-amd64/install.sh \u0026\u0026 sudo -u ubuntu hakurei version \u0026\u0026 mkdir /var/empty"},{"name":"Compile and run test suite","run":"rm -rf result \u0026\u0026 go run -tags=testsuite ./test/sandbox"}]},"sharefs":{"name":"ShareFS","runs-on":"rosa","steps":[{"name":"Fix container filesystem","run":"rm /var/run \u0026\u0026 ln -sf ../run /var"},{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Set up Go toolchain","uses":"actions/setup-go@v6","with":{"go-version-file":"go.mod"}},{"name":"Install packages","uses":"awalsh128/cache-apt-pkgs-action@v1","with":{"add-repository":"","packages":"fuse3 fsmark","version":0,"execute_install_scripts":true}},{"name":"Request distribution","id":"dist","run":"HAKUREI_REV=\"$(git rev-parse --short HEAD)\" \u0026\u0026 /rosa/bin/mbf ci dist -o result . \"$(cat cmd/dist/VERSION)-$HAKUREI_REV\" \u0026\u0026 echo \"rev=$HAKUREI_REV\" \u003e\u003e \"$GITHUB_OUTPUT\""},{"name":"Install hakurei","run":"HAKUREI_VERSION=\"$(cat cmd/dist/VERSION)-${{ steps.dist.outputs.rev }}\" \u0026\u0026 tar xf result/hakurei-$HAKUREI_VERSION*-amd64.tar.gz \u0026\u0026 ./hakurei-$HAKUREI_VERSION*-amd64/install.sh \u0026\u0026 sudo -u ubuntu hakurei version \u0026\u0026 mkdir /var/empty"},{"name":"Mount sharefs","run":"useradd -ru 1023 -md /var/lib/sdcard -k /var/empty -s /sbin/nologin media_rw \u0026\u0026 install -dm0 /sdcard \u0026\u0026 sharefs -o rw,noexec,nosuid,nodev,noatime,allow_other,mkdir,source=/var/lib/sdcard,setuid=1023,setgid=1023 /sdcard"},{"name":"Compile and run test suite","run":"sharefs -V \u0026\u0026 rm -rf result \u0026\u0026 go run -tags=testsuite ./test/sharefs"},{"name":"Upload test output","uses":"actions/upload-artifact@v3","with":{"name":"fs_mark","path":"result/*","retention-days":1}}]},"dist":{"name":"Create distribution","runs-on":"rosa","steps":[{"name":"Fix container filesystem","run":"rm /var/run \u0026\u0026 ln -sf ../run /var"},{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Request distribution","id":"dist-test","run":"HAKUREI_REV=\"$(git rev-parse --short HEAD)\" \u0026\u0026 /rosa/bin/mbf ci dist -o result . \"$(cat cmd/dist/VERSION)-$HAKUREI_REV\" \u0026\u0026 echo \"rev=$HAKUREI_REV\" \u003e\u003e \"$GITHUB_OUTPUT\""},{"name":"Upload distribution","uses":"actions/upload-artifact@v3","with":{"name":"dist-${{ steps.dist-test.outputs.rev }}","path":"result/*","retention-days":1}}]}}}
diff --git a/ext/mksysnum_linux.pl b/ext/mksysnum_linux.pl
index 1921e7b9..22ec3fcf 100755
--- a/ext/mksysnum_linux.pl
+++ b/ext/mksysnum_linux.pl
@@ -55,7 +55,7 @@ sub fmt {
GENERATE:
my $prev;
-open(GCC, "gcc -E -dD $ARGV[0] |") || die "can't run gcc";
+open(GCC, "clang -E -dD $ARGV[0] |") || die "cannot run clang";
while(<GCC>){
if(/^#define __NR_Linux\s+([0-9]+)/){
# mips/mips64: extract offset
diff --git a/internal/workflows/step.go b/internal/workflows/step.go
index eaf8986d..93d515ae 100644
--- a/internal/workflows/step.go
+++ b/internal/workflows/step.go
@@ -95,6 +95,6 @@ func newNixOSTest(name string) Step {
"--out-link result " +
"--print-out-paths " +
"--print-build-logs " +
- "./test#checks.x86_64-linux." + name,
+ "./test/hakurei#checks.x86_64-linux." + name,
}
}
diff --git a/internal/workflows/test.go b/internal/workflows/test.go
index c81574ea..bd74511c 100644
--- a/internal/workflows/test.go
+++ b/internal/workflows/test.go
@@ -7,7 +7,7 @@ var _ = (&Workflow{
On: []any{"push"},
Jobs: Map[Job]{
- {"hakurei", Job{
+ {"hakurei-legacy", Job{
Name: "Hakurei (legacy)",
On: "nix",
@@ -18,7 +18,7 @@ var _ = (&Workflow{
},
}},
- {"race", Job{
+ {"hakurei-race-legacy", Job{
Name: "Hakurei (legacy with race instrument)",
On: "nix",
@@ -106,28 +106,6 @@ var _ = (&Workflow{
},
}},
- {"check", Job{
- Name: "Flake checks",
- On: "nix",
-
- Needs: []string{
- "hakurei",
- "race",
- },
-
- Steps: []Step{
- checkout,
-
- {
- Name: "Run checks",
- Run: "nix " +
- "--print-build-logs " +
- "--experimental-features 'nix-command flakes' " +
- "flake check ./test",
- },
- },
- }},
-
{"dist", Job{
Name: "Create distribution",
On: "rosa",
diff --git a/test/flake.nix b/test/flake.nix
deleted file mode 100644
index 9b18c9b6..00000000
--- a/test/flake.nix
+++ /dev/null
@@ -1,167 +0,0 @@
-{
- description = "hakurei container tool and nixos module";
-
- inputs = {
- nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
-
- home-manager = {
- url = "github:nix-community/home-manager/release-26.05";
- inputs.nixpkgs.follows = "nixpkgs";
- };
- };
-
- outputs =
- {
- self,
- nixpkgs,
- home-manager,
- }:
- let
- supportedSystems = [
- "aarch64-linux"
- "i686-linux"
- "x86_64-linux"
- ];
-
- forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
- nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
- in
- {
- nixosModules.hakurei = import ./nixos.nix self.packages;
-
- checks = forAllSystems (
- system:
- let
- pkgs = nixpkgsFor.${system};
-
- inherit (pkgs)
- runCommandLocal
- callPackage
- nixfmt
- ;
- in
- {
- hakurei = callPackage ./. { inherit system self; };
- race = callPackage ./. {
- inherit system self;
- withRace = true;
- };
- }
- );
-
- packages = forAllSystems (
- system:
- let
- inherit (self.packages.${system}) hakurei hsu;
- pkgs = nixpkgsFor.${system};
- in
- {
- default = hakurei;
- hakurei = pkgs.pkgsStatic.callPackage ./package.nix {
- inherit (pkgs)
- # passthru.buildInputs
- go_1_27
- clang
-
- # nativeBuildInputs
- pkg-config
- wayland-scanner
- makeBinaryWrapper
-
- # appPackages
- glibc
- xdg-dbus-proxy
-
- # for check
- util-linux
- nettools
- ;
- };
- 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";
- };
-
- dist =
- pkgs.runCommand "${hakurei.name}-dist"
- {
- buildInputs = hakurei.targetPkgs ++ [
- pkgs.pkgsStatic.musl
- ];
- }
- ''
- cd $(mktemp -d) \
- && cp -r ${hakurei.src}/. . \
- && chmod +w cmd && cp -r ${hsu.src}/. cmd/hsu/ \
- && chmod -R +w .
-
- CC="musl-clang -O3 -Werror -Qunused-arguments" \
- GOCACHE="$(mktemp -d)" \
- PATH="${pkgs.pkgsStatic.musl.bin}/bin:$PATH" \
- DESTDIR="$out" \
- ./all.sh
- '';
- }
- );
-
- devShells = forAllSystems (
- system:
- let
- inherit (self.packages.${system}) hakurei;
- pkgs = nixpkgsFor.${system};
- in
- {
- default = pkgs.mkShell {
- buildInputs = hakurei.targetPkgs;
- hardeningDisable = [ "fortify" ];
- };
- withPackage = pkgs.mkShell { buildInputs = [ hakurei ] ++ hakurei.targetPkgs; };
-
- generateDoc =
- let
- inherit (pkgs) lib;
-
- doc =
- let
- eval = lib.evalModules {
- specialArgs = {
- inherit pkgs;
- };
- modules = [ (import ./options.nix self.packages) ];
- };
- cleanEval = lib.filterAttrsRecursive (n: _: n != "_module") eval;
- in
- pkgs.nixosOptionsDoc { inherit (cleanEval) options; };
- docText = pkgs.runCommand "hakurei-module-docs.md" { } ''
- cat ${doc.optionsCommonMark} > $out
- sed -i '/*Declared by:*/,+1 d' $out
- '';
- in
- pkgs.mkShell {
- shellHook = ''
- exec cat ${docText} > options.md
- '';
- };
-
- generateSyscallTable =
- let
- GOARCH = {
- x86_64-linux = "amd64";
- aarch64-linux = "arm64";
- };
- in
- pkgs.mkShell {
- shellHook = "exec ${pkgs.writeShellScript "generate-syscall-table" ''
- set -e
- ${pkgs.perl}/bin/perl \
- container/std/mksysnum_linux.pl \
- ${pkgs.linuxHeaders}/include/asm/unistd_64.h | \
- ${pkgs.go}/bin/gofmt > \
- container/std/syscall_linux_${GOARCH.${system}}.go
- ''}";
- };
- }
- );
- };
-}
diff --git a/test/configuration.nix b/test/hakurei/configuration.nix
index 62d8239d..62d8239d 100644
--- a/test/configuration.nix
+++ b/test/hakurei/configuration.nix
diff --git a/test/default.nix b/test/hakurei/default.nix
index 81daa0a2..81daa0a2 100644
--- a/test/default.nix
+++ b/test/hakurei/default.nix
diff --git a/test/flake.lock b/test/hakurei/flake.lock
index 5537506a..5537506a 100644
--- a/test/flake.lock
+++ b/test/hakurei/flake.lock
diff --git a/test/hakurei/flake.nix b/test/hakurei/flake.nix
new file mode 100644
index 00000000..dc42b1cb
--- /dev/null
+++ b/test/hakurei/flake.nix
@@ -0,0 +1,76 @@
+{
+ description = "hakurei container tool and nixos module";
+
+ inputs = {
+ nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
+
+ home-manager = {
+ url = "github:nix-community/home-manager/release-26.05";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+ };
+
+ outputs =
+ {
+ self,
+ nixpkgs,
+ home-manager,
+ }:
+ let
+ supportedSystems = [ "x86_64-linux" ];
+
+ forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
+ nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
+ in
+ {
+ nixosModules.hakurei = import ./nixos.nix self.packages;
+
+ checks = forAllSystems (
+ system:
+ let
+ pkgs = nixpkgsFor.${system};
+
+ inherit (pkgs) callPackage;
+ in
+ {
+ hakurei = callPackage ./. { inherit system self; };
+ race = callPackage ./. {
+ inherit system self;
+ withRace = true;
+ };
+ }
+ );
+
+ packages = forAllSystems (
+ system:
+ let
+ inherit (self.packages.${system}) hakurei hsu;
+ pkgs = nixpkgsFor.${system};
+ in
+ {
+ default = hakurei;
+ hakurei = pkgs.pkgsStatic.callPackage ./package.nix {
+ inherit (pkgs)
+ # passthru.buildInputs
+ go_1_27
+ clang
+
+ # nativeBuildInputs
+ pkg-config
+ wayland-scanner
+ makeBinaryWrapper
+
+ # appPackages
+ glibc
+ xdg-dbus-proxy
+
+ # for check
+ util-linux
+ nettools
+ ;
+ };
+ hsu = pkgs.callPackage ./hsu.nix { inherit (self.packages.${system}) hakurei; };
+ }
+ );
+ };
+}
diff --git a/test/hsu.nix b/test/hakurei/hsu.nix
index 7acb3529..5dd4cf5d 100644
--- a/test/hsu.nix
+++ b/test/hakurei/hsu.nix
@@ -8,7 +8,7 @@ buildGoModule {
pname = "${hakurei.pname}-hsu";
inherit (hakurei) version;
- src = ../cmd/hsu;
+ src = ../../cmd/hsu;
inherit (hakurei) vendorHash;
env.CGO_ENABLED = 0;
diff --git a/test/nixos.nix b/test/hakurei/nixos.nix
index 49bfffb6..49bfffb6 100644
--- a/test/nixos.nix
+++ b/test/hakurei/nixos.nix
diff --git a/test/options.nix b/test/hakurei/options.nix
index f624b6f5..f624b6f5 100644
--- a/test/options.nix
+++ b/test/hakurei/options.nix
diff --git a/test/package.nix b/test/hakurei/package.nix
index e68420e3..0facf291 100644
--- a/test/package.nix
+++ b/test/hakurei/package.nix
@@ -34,11 +34,11 @@
buildGo127Module 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/test.py b/test/hakurei/test.py
index 98f08275..98f08275 100644
--- a/test/test.py
+++ b/test/hakurei/test.py