forked from security/hakurei
@@ -64,7 +64,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var _ encoding.TextMarshaler = _SCHED_LAST
|
var _ encoding.TextMarshaler = _SCHED_LAST
|
||||||
var _ encoding.TextUnmarshaler = new(SchedPolicy)
|
var _ encoding.TextUnmarshaler = new(_SCHED_LAST)
|
||||||
|
|
||||||
// String returns a unique representation of policy, also used in encoding.
|
// String returns a unique representation of policy, also used in encoding.
|
||||||
func (policy SchedPolicy) String() string {
|
func (policy SchedPolicy) String() string {
|
||||||
|
|||||||
12
flake.lock
generated
12
flake.lock
generated
@@ -7,11 +7,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765384171,
|
"lastModified": 1772985280,
|
||||||
"narHash": "sha256-FuFtkJrW1Z7u+3lhzPRau69E0CNjADku1mLQQflUORo=",
|
"narHash": "sha256-FdrNykOoY9VStevU4zjSUdvsL9SzJTcXt4omdEDZDLk=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "44777152652bc9eacf8876976fa72cc77ca8b9d8",
|
"rev": "8f736f007139d7f70752657dff6a401a585d6cbc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -23,11 +23,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765311797,
|
"lastModified": 1772822230,
|
||||||
"narHash": "sha256-mSD5Ob7a+T2RNjvPvOA1dkJHGVrNVl8ZOrAwBjKBDQo=",
|
"narHash": "sha256-yf3iYLGbGVlIthlQIk5/4/EQDZNNEmuqKZkQssMljuw=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "09eb77e94fa25202af8f3e81ddc7353d9970ac1b",
|
"rev": "71caefce12ba78d84fe618cf61644dce01cf3a96",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -99,7 +99,7 @@
|
|||||||
hakurei = pkgs.pkgsStatic.callPackage ./package.nix {
|
hakurei = pkgs.pkgsStatic.callPackage ./package.nix {
|
||||||
inherit (pkgs)
|
inherit (pkgs)
|
||||||
# passthru.buildInputs
|
# passthru.buildInputs
|
||||||
go
|
go_1_26
|
||||||
clang
|
clang
|
||||||
|
|
||||||
# nativeBuildInputs
|
# nativeBuildInputs
|
||||||
@@ -182,7 +182,7 @@
|
|||||||
let
|
let
|
||||||
# this is used for interactive vm testing during development, where tests might be broken
|
# this is used for interactive vm testing during development, where tests might be broken
|
||||||
package = self.packages.${pkgs.stdenv.hostPlatform.system}.hakurei.override {
|
package = self.packages.${pkgs.stdenv.hostPlatform.system}.hakurei.override {
|
||||||
buildGoModule = previousArgs: pkgs.pkgsStatic.buildGoModule (previousArgs // { doCheck = false; });
|
buildGo126Module = previousArgs: pkgs.pkgsStatic.buildGo126Module (previousArgs // { doCheck = false; });
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|||||||
34
package.nix
34
package.nix
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
stdenv,
|
stdenv,
|
||||||
buildGoModule,
|
buildGo126Module,
|
||||||
makeBinaryWrapper,
|
makeBinaryWrapper,
|
||||||
xdg-dbus-proxy,
|
xdg-dbus-proxy,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
fuse3,
|
fuse3,
|
||||||
|
|
||||||
# for passthru.buildInputs
|
# for passthru.buildInputs
|
||||||
go,
|
go_1_26,
|
||||||
clang,
|
clang,
|
||||||
|
|
||||||
# for check
|
# for check
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
withStatic ? stdenv.hostPlatform.isStatic,
|
withStatic ? stdenv.hostPlatform.isStatic,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGo126Module rec {
|
||||||
pname = "hakurei";
|
pname = "hakurei";
|
||||||
version = "0.3.6";
|
version = "0.3.6";
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ buildGoModule rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
go
|
go_1_26
|
||||||
pkg-config
|
pkg-config
|
||||||
wayland-scanner
|
wayland-scanner
|
||||||
];
|
];
|
||||||
@@ -125,16 +125,20 @@ buildGoModule rec {
|
|||||||
--inherit-argv0 --prefix PATH : ${lib.makeBinPath appPackages}
|
--inherit-argv0 --prefix PATH : ${lib.makeBinPath appPackages}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru.targetPkgs = [
|
passthru = {
|
||||||
go
|
go = go_1_26;
|
||||||
clang
|
|
||||||
xorg.xorgproto
|
|
||||||
util-linux
|
|
||||||
|
|
||||||
# for go generate
|
targetPkgs = [
|
||||||
wayland-protocols
|
go_1_26
|
||||||
wayland-scanner
|
clang
|
||||||
]
|
xorg.xorgproto
|
||||||
++ buildInputs
|
util-linux
|
||||||
++ nativeBuildInputs;
|
|
||||||
|
# for go generate
|
||||||
|
wayland-protocols
|
||||||
|
wayland-scanner
|
||||||
|
]
|
||||||
|
++ buildInputs
|
||||||
|
++ nativeBuildInputs;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ testers.nixosTest {
|
|||||||
(writeShellScriptBin "hakurei-test" ''
|
(writeShellScriptBin "hakurei-test" ''
|
||||||
# Assert hst CGO_ENABLED=0: ${
|
# Assert hst CGO_ENABLED=0: ${
|
||||||
with pkgs;
|
with pkgs;
|
||||||
runCommand "hakurei-hst-cgo" { nativeBuildInputs = [ go ]; } ''
|
runCommand "hakurei-hst-cgo" { nativeBuildInputs = [ self.packages.${system}.hakurei.go ]; } ''
|
||||||
cp -r ${options.environment.hakurei.package.default.src} "$out"
|
cp -r ${options.environment.hakurei.package.default.src} "$out"
|
||||||
chmod -R +w "$out"
|
chmod -R +w "$out"
|
||||||
cp ${writeText "hst_cgo_test.go" ''package hakurei_test;import("testing";"hakurei.app/hst");func TestTemplate(t *testing.T){hst.Template()}''} "$out/hst_cgo_test.go"
|
cp ${writeText "hst_cgo_test.go" ''package hakurei_test;import("testing";"hakurei.app/hst");func TestTemplate(t *testing.T){hst.Template()}''} "$out/hst_cgo_test.go"
|
||||||
|
|||||||
Reference in New Issue
Block a user