Compare commits

...

10 commits

Author SHA1 Message Date
7c9c031506
show logs 2024-09-04 11:57:20 -05:00
d7a8a9e56d
add pipe 2024-09-04 11:55:06 -05:00
43e26862ee
follow nixpkgs 2024-09-04 11:53:21 -05:00
04f2b592a3
add nimble overlay 2024-09-04 11:51:35 -05:00
7c28690527
use code instead of status 2024-09-04 11:09:22 -05:00
e5ad1d945e
hope that fixed FOD stuff 2024-09-04 11:08:13 -05:00
07f4c16b55
consistent styling 2024-09-04 10:51:00 -05:00
cdbeffffec
follows 2024-09-04 10:50:09 -05:00
2c916149d7
remove debug echo 2024-09-04 10:19:27 -05:00
8980398e73
fix dry run parsing 2024-09-03 15:08:24 -05:00
9 changed files with 48 additions and 63 deletions

View file

@ -36,6 +36,7 @@ jobs:
with:
source-url: https://install.lix.systems/lix/lix-installer-x86_64-linux
extra-conf: |
experimental-features = pipe-operator
accept-flake-config = true
- uses: DeterminateSystems/magic-nix-cache-action@v7
@ -52,7 +53,7 @@ jobs:
git diff
- name: Pre-build Oizys
run: nix build .
run: nix build . --print-build-logs
- name: Build
run: |

View file

@ -539,36 +539,17 @@
}
},
"nim2nix": {
"inputs": {
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1725378873,
"narHash": "sha256-FHuKRJbzusZNnGi1nykC5H5hMwyJE4zGqoPXDQWxa/E=",
"owner": "daylinmorgan",
"repo": "nim2nix",
"rev": "c16db19a0809a01189f708848773fbd4c81319db",
"type": "github"
},
"original": {
"owner": "daylinmorgan",
"repo": "nim2nix",
"type": "github"
}
},
"nim2nix_2": {
"inputs": {
"nixpkgs": [
"utils",
"nixpkgs"
]
},
"locked": {
"lastModified": 1724878933,
"narHash": "sha256-VP0+Lal3jJJqDH1EzQX73rP9Ue8ZTIyAErJvDz6PQSg=",
"lastModified": 1725465990,
"narHash": "sha256-+KN+E3B5lVxi5K0rrDC41l080n/r04LOpmfxK3ZJ058=",
"owner": "daylinmorgan",
"repo": "nim2nix",
"rev": "5153c772e4c6a4f5645efa85ce536fe1c5063ebb",
"rev": "cac4c7106ea09e04b4a555e4f957e38be65dfbb4",
"type": "github"
},
"original": {
@ -581,7 +562,7 @@
"inputs": {
"flake-parts": "flake-parts",
"nix-github-actions": "nix-github-actions",
"nixpkgs": "nixpkgs_6",
"nixpkgs": "nixpkgs_5",
"treefmt-nix": "treefmt-nix"
},
"locked": {
@ -669,7 +650,7 @@
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_4"
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1725358307,
@ -721,7 +702,7 @@
"flake-compat": "flake-compat_2",
"lib-aggregate": "lib-aggregate",
"nix-eval-jobs": "nix-eval-jobs",
"nixpkgs": "nixpkgs_7"
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1725292436,
@ -754,22 +735,6 @@
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1724479785,
"narHash": "sha256-pP3Azj5d6M5nmG68Fu4JqZmdGt4S4vqI5f8te+E/FTw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d0e1602ddde669d5beb01aec49d71a51937ed7be",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1725001927,
"narHash": "sha256-eV+63gK0Mp7ygCR0Oy4yIYSNcum2VQwnZamHxYTNi+M=",
@ -785,7 +750,7 @@
"type": "github"
}
},
"nixpkgs_5": {
"nixpkgs_4": {
"locked": {
"lastModified": 1725194671,
"narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=",
@ -801,7 +766,7 @@
"type": "github"
}
},
"nixpkgs_6": {
"nixpkgs_5": {
"locked": {
"lastModified": 1723221148,
"narHash": "sha256-7pjpeQlZUNQ4eeVntytU3jkw9dFK3k1Htgk2iuXjaD8=",
@ -817,7 +782,7 @@
"type": "github"
}
},
"nixpkgs_7": {
"nixpkgs_6": {
"locked": {
"lastModified": 1724819573,
"narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=",
@ -888,7 +853,7 @@
"nim2nix": "nim2nix",
"nix-index-database": "nix-index-database",
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_5",
"nixpkgs": "nixpkgs_4",
"nixpkgs-wayland": "nixpkgs-wayland",
"pixi": "pixi",
"roc": "roc",
@ -1091,7 +1056,9 @@
},
"utils": {
"inputs": {
"nim2nix": "nim2nix_2",
"nim2nix": [
"nim2nix"
],
"nixpkgs": [
"nixpkgs"
]

View file

@ -33,13 +33,18 @@
hyprman.url = "git+https://git.dayl.in/daylin/hyprman.git";
utils.url = "git+https://git.dayl.in/daylin/utils.git";
utils.inputs = {
nixpkgs.follows = "nixpkgs";
nim2nix.follows = "nim2nix";
};
nim2nix.inputs.nixpkgs.follows = "nixpkgs";
hyprman.inputs.nixpkgs.follows = "nixpkgs";
f1multiviewer.inputs.nixpkgs.follows = "nixpkgs";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
pixi.inputs.nixpkgs.follows = "nixpkgs";
roc.inputs.nixpkgs.follows = "nixpkgs";
tsm.inputs.nixpkgs.follows = "nixpkgs";
utils.inputs.nixpkgs.follows = "nixpkgs";
zls.inputs.nixpkgs.follows = "nixpkgs";
zls.inputs.zig-overlay.follows = "zig-overlay";
zig-overlay.inputs.nixpkgs.follows = "nixpkgs";

View file

@ -9,10 +9,20 @@ let
inherit (import ./generators.nix { inherit lib self inputs; }) mkIso mkSystem;
#supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
supportedSystems = [ "x86_64-linux" ];
forAllSystems = f: genAttrs supportedSystems (system: f (import nixpkgs {
inherit system;
overlays = [inputs.nim2nix.overlays.default];
}));
forAllSystems =
f:
genAttrs supportedSystems (
system:
f (
import nixpkgs {
inherit system;
overlays = [
inputs.nim2nix.overlays.default
(import ../overlays/nimble { inherit inputs; })
];
}
)
);
inheritFlakePkgs =
pkgs: flakes:
@ -29,9 +39,9 @@ let
packages = forAllSystems (
pkgs:
rec {
default = oizys-cli;
default = oizys-nim;
oizys-nim = pkgs.callPackage ../pkgs/oizys-nim { };
oizys-cli = pkgs.callPackage ../pkgs/oizys { };
oizys-go = pkgs.callPackage ../pkgs/oizys { };
iso = mkIso.config.system.build.isoImage;
roc = (pkgsFromSystem pkgs.system "roc").full;
}
@ -46,7 +56,7 @@ let
oizys = pkgs.mkShell {
packages = with pkgs; [
openssl
nim
nim
nimble
];
};

View file

@ -49,8 +49,8 @@ let
nixosSystem {
system = "x86_64-linux";
modules = [
../modules/oizys.nix
../overlays
../modules/oizys.nix
inputs.lix-module.nixosModules.default
inputs.hyprland.nixosModules.default
] ++ (hostFiles hostName);

View file

@ -8,5 +8,5 @@ buildNimblePackage {
verions = "unstable";
src = lib.cleanSource ./.;
nativeBuildInputs = [ openssl ];
nimbleDepsHash = "sha256-Eheeve4MbB3v1oVj0mB36Mv2Q3vJGLEbbShds1af23g=";
nimbleDepsHash = "sha256-n+K5hFiS1tEy2jDAoAoSgE75TCiqZK+al/0Mfc1d4kI=";
}

View file

@ -85,7 +85,7 @@ proc setupCligen() =
clCfg.helpAttrOff = {"cmd": "\e[m", "clDescrip": "\e[m", "clDflVal": "\e[m",
"clOptKeys": "\e[m", "clValType": "\e[m", "args": "\e[m"}.toTable()
# clCfg.use does nothing?
clCfg.useHdr = "\e[1mUsage\e[m:\n "
clCfg.useHdr = "\e[1musage\e[m:\n "
when isMainModule:
checkExes()

View file

@ -19,14 +19,16 @@ proc postGhApi(url: string, body: JsonNode) =
"Authorization" : fmt"Bearer {ghToken}",
"X-GitHub-Api-Version": "2022-11-28",
})
echo $body
let response = client.post(url, body = $body)
info fmt"Status: {response.status}"
try:
info fmt"Status: {response.code}"
except:
error "failed to get response code"
proc createDispatch*(workflowFileName: string, `ref`: string) =
## https://docs.github.com/en/rest/actions/workflows?apiVersion=2022-11-28#create-a-workflow-dispatch-event
var workflow =
if workflowFileName.endsWith(".yml") or workflowFileName.endsWith(".yaml"): workflowFileName
if workflowFileName.endsWith(".yml") or workflowFileName.endsWith(".yaml"): workflowFileName
else: workflowFileName & ".yml"
info fmt"creating dispatch event for {workflow}"
postGhApi(

View file

@ -66,11 +66,11 @@ proc parseDryRunOutput(err: string): DryRunOutput =
of 1:
let idx = theseLines[0]
let line = lines[idx]
let drvs = lines[idx .. ^1].toDerivations()
let drvs = lines[idx + 1 .. ^1].toDerivations()
if line.contains("built:"):
result.toBuild = drvs
elif line.contains("will be fetched"):
result.toFetch =drvs
result.toFetch = drvs
else:
fatal "expected on of the lines to contain built or fetched check the output below"
stderr.writeLine err