mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-23 15:10:44 -06:00
Compare commits
10 commits
912be37cc0
...
7c9c031506
Author | SHA1 | Date | |
---|---|---|---|
7c9c031506 | |||
d7a8a9e56d | |||
43e26862ee | |||
04f2b592a3 | |||
7c28690527 | |||
e5ad1d945e | |||
07f4c16b55 | |||
cdbeffffec | |||
2c916149d7 | |||
8980398e73 |
9 changed files with 48 additions and 63 deletions
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
|
@ -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: |
|
||||
|
|
59
flake.lock
59
flake.lock
|
@ -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"
|
||||
]
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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
|
||||
];
|
||||
};
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -8,5 +8,5 @@ buildNimblePackage {
|
|||
verions = "unstable";
|
||||
src = lib.cleanSource ./.;
|
||||
nativeBuildInputs = [ openssl ];
|
||||
nimbleDepsHash = "sha256-Eheeve4MbB3v1oVj0mB36Mv2Q3vJGLEbbShds1af23g=";
|
||||
nimbleDepsHash = "sha256-n+K5hFiS1tEy2jDAoAoSgE75TCiqZK+al/0Mfc1d4kI=";
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue