chore: update zig-nuplugin and add nix flake
Some checks failed
/ test (push) Failing after 1m51s

This commit is contained in:
LordMZTE 2024-07-31 09:44:21 +02:00
parent 3b56f24f12
commit 852ce5e15c
Signed by: LordMZTE
GPG key ID: B64802DC33A64FF6
4 changed files with 142 additions and 2 deletions

View file

@ -4,8 +4,8 @@
.dependencies = .{
.nuplugin = .{
.url = "git+https://git.mzte.de/LordMZTE/zig-nuplugin.git#4a6322e7f088a78a0c0ef21a4157a9f57f659213",
.hash = "1220956eac5ca44d1cdf4355910986bc32f3d106d0d4b25708ceb9adb6f5d31e295f",
.url = "git+https://git.mzte.de/LordMZTE/zig-nuplugin.git#d733ba7da55b82f9307ca5eac4c9a2156937baaa",
.hash = "12206055a1e88695672cf43237969f557a519a71108463d8a931042fe47c8be1e087",
},
},

44
deps.nix Normal file
View file

@ -0,0 +1,44 @@
{ pkgs, ... }:
pkgs.linkFarm "zig-packages" [
# zig-args
{
name = "12206055a1e88695672cf43237969f557a519a71108463d8a931042fe47c8be1e087";
path = pkgs.fetchgit {
url = "https://git.mzte.de/LordMZTE/zig-nuplugin.git";
rev = "d733ba7da55b82f9307ca5eac4c9a2156937baaa";
hash = "sha256-UPVNM1nnF6FLHAs74HnIBy23W7MJnrXQ87+YeS6eYsE=";
};
}
# == INDIRECT DEPENDENCIES ==
# getty-msgpack (zig-nuplugin dep)
{
name = "1220a8c39b96992f501dc0733e689ba099ab964ecda720b33070f2ed6251786b2438";
path = pkgs.fetchgit {
url = "https://git.mzte.de/LordMZTE/getty-msgpack.git";
rev = "deb0e1dc33ee4f8240542f584729f2ee6fc24f49";
hash = "sha256-CurMto+CfypRpGYKiLdcfsYGQk/lexWc5n8y7LbbSSw=";
};
}
# getty (zig-nuplugin dep)
{
name = "12204235c113ed912d951e381066d587bb398b7175dc635c50c17864946bbd570879";
path = pkgs.fetchgit {
url = "https://github.com/getty-zig/getty.git";
rev = "78738b665a53db4be85696635b9c832fbca8d273";
hash = "sha256-tXxI5ctp7Uz7OK5KmKUHKLPksdI6FJU75XiM+UqtcaI=";
};
}
# protest (getty dep)
{
name = "122014736a658ee30f82e5c6e3038c95727690fe01fced2791b213dba10c65fba7c5";
path = pkgs.fetchgit {
url = "https://github.com/ibokuri/protest.git";
rev = "e7a9bc39c213985814a904b38e4506a6fbd537b2";
hash = "sha256-aW+ivk021gJP3RWHl0X023kpDcwGJVETEw5oooNdG60=";
};
}
]

61
flake.lock Normal file
View file

@ -0,0 +1,61 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1722185531,
"narHash": "sha256-veKR07psFoJjINLC8RK4DiLniGGMgF3QMlS4tb74S6k=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "52ec9ac3b12395ad677e8b62106f0b98c1f8569d",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"utils": "utils"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

35
flake.nix Normal file
View file

@ -0,0 +1,35 @@
{
description = "Nushell plugin for jobcontrol";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
utils.url = "github:numtide/flake-utils";
};
outputs =
{ self
, nixpkgs
, utils
}: utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
deps = pkgs.callPackage ./deps.nix { };
in
{
packages.default = pkgs.stdenv.mkDerivation {
name = "nu-plugin-jobcontrol";
src = ./.;
dontConfigure = true;
nativeBuildInputs = with pkgs; [
zig_0_13.hook
];
postPatch = ''
ln -sf "${deps}" "$ZIG_GLOBAL_CACHE_DIR/p"
'';
};
});
}