aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/flake.nix
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-10-06 22:09:47 +0900
committerOphestra <cat@gensokyo.uk>2026-10-06 22:15:54 +0900
commit19f36491f2e2a5029ac396c10408d653cad6c81b (patch)
tree929829580b2a588f24eccc698f1827c050e941ac /test/flake.nix
parentd5d2c23d5a489bba6be8a75ad4c5d1ac3cda4bb6 (diff)
test: remove obsolete code
Nix stuff is being removed, most of the flake.nix stuff is no longer used by anything, so remove them here. This change also replaces a hardcoded gcc command. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'test/flake.nix')
-rw-r--r--test/flake.nix167
1 files changed, 0 insertions, 167 deletions
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
- ''}";
- };
- }
- );
- };
-}