mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-30 12:10:43 -06:00
Compare commits
8 commits
d4b77becb8
...
4808169e87
Author | SHA1 | Date | |
---|---|---|---|
|
4808169e87 | ||
4c0b71d1de | |||
53e6e9951c | |||
40fb99a47b | |||
52d88c099f | |||
186905a17d | |||
e23a4fbce5 | |||
|
998e2d2e95 |
5 changed files with 190 additions and 33 deletions
127
flake.lock
127
flake.lock
|
@ -38,7 +38,7 @@
|
||||||
},
|
},
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_2"
|
"systems": "systems_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1709126324,
|
"lastModified": 1709126324,
|
||||||
|
@ -54,23 +54,50 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"hyprcursor": {
|
||||||
|
"inputs": {
|
||||||
|
"hyprlang": "hyprlang",
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": [
|
||||||
|
"hyprland",
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1709942067,
|
||||||
|
"narHash": "sha256-DGU4zQDwIx6pXM6oHdA+89UU/QjqE05HiXOvigECJjI=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprcursor",
|
||||||
|
"rev": "a2233d4a2a58233457712acfd88d10a2a8a85711",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprcursor",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"hyprland": {
|
"hyprland": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"hyprcursor": "hyprcursor",
|
||||||
"hyprland-protocols": "hyprland-protocols",
|
"hyprland-protocols": "hyprland-protocols",
|
||||||
"hyprlang": "hyprlang",
|
"hyprlang": "hyprlang_2",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"systems": "systems",
|
"systems": "systems_2",
|
||||||
"wlroots": "wlroots",
|
"wlroots": "wlroots",
|
||||||
"xdph": "xdph"
|
"xdph": "xdph"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1709425896,
|
"lastModified": 1710026388,
|
||||||
"narHash": "sha256-r/Tsr+BfgaiJIWTwWrrxHzTmNGEIi8HzYDGO3kFJmx8=",
|
"narHash": "sha256-Z/ReJhaauOe+uThHB1LJ/3tJOnNxdYybS72Z8gkRWT8=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "Hyprland",
|
"repo": "Hyprland",
|
||||||
"rev": "2a08f2ba84ead47bd13aae5797d0d71b2e11b612",
|
"rev": "335506d5557b91a0baf974750c353443841e691b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -126,6 +153,29 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"hyprlang": {
|
"hyprlang": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"hyprland",
|
||||||
|
"hyprcursor",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1709914708,
|
||||||
|
"narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=",
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprlang",
|
||||||
|
"rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hyprwm",
|
||||||
|
"repo": "hyprlang",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hyprlang_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"hyprland",
|
"hyprland",
|
||||||
|
@ -137,11 +187,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1708787654,
|
"lastModified": 1709914708,
|
||||||
"narHash": "sha256-7ACgM3ZuAhPqurXHUvR2nWMRcnmzGGPjLK6q4DSTelI=",
|
"narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "hyprlang",
|
"repo": "hyprlang",
|
||||||
"rev": "0fce791ba2334aca183f2ed42399518947550d0d",
|
"rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -156,11 +206,11 @@
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1709208631,
|
"lastModified": 1709467759,
|
||||||
"narHash": "sha256-n+SCii/GQR3zjaZzjhGAjrQQlF+xjaGEjWdpDb4wJ3U=",
|
"narHash": "sha256-ojIpNROGKk56wyvpMAlBVor3CvPez3pFMORrocxW4io=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "lib-aggregate",
|
"repo": "lib-aggregate",
|
||||||
"rev": "1f03ac8dc3a54f68f55d36b5e7fc65afc302a3d7",
|
"rev": "206e40afdc468d0658e30e1644e2473dc6285cf2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -220,11 +270,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1708830466,
|
"lastModified": 1709906691,
|
||||||
"narHash": "sha256-nGKe3Y1/jkLR2eh1aRSVBtKadMBNv8kOnB52UXqRy6A=",
|
"narHash": "sha256-206XMy1NGW42bnHukJl5W2F90yHNoJc7+H3i+/8i2Pg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nix-index-database",
|
"repo": "nix-index-database",
|
||||||
"rev": "f070c7eeec3bde8c8c8baa9c02b6d3d5e114d73b",
|
"rev": "2ad5ebce1e1be47a8cf330d85265ac09ffa15178",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -235,11 +285,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1709356872,
|
"lastModified": 1709968316,
|
||||||
"narHash": "sha256-mvxCirJbtkP0cZ6ABdwcgTk0u3bgLoIoEFIoYBvD6+4=",
|
"narHash": "sha256-4rZEtEDT6jcgRaqxsatBeds7x1PoEiEjb6QNGb4mNrk=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "458b097d81f90275b3fdf03796f0563844926708",
|
"rev": "0e7f98a5f30166cbed344569426850b21e4091d4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -251,11 +301,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-lib": {
|
"nixpkgs-lib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1708821942,
|
"lastModified": 1709426687,
|
||||||
"narHash": "sha256-jd+E1SD59qty65pwqad2mftzkT6vW5nNFWVuvayh4Zw=",
|
"narHash": "sha256-jLBZmwXf0WYHzLkmEMq33bqhX55YtT5edvluFr0RcSA=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs.lib",
|
"repo": "nixpkgs.lib",
|
||||||
"rev": "479831ed8b3c9c7b80533999f880c7d0bf6a491b",
|
"rev": "7873d84a89ae6e4841528ff7f5697ddcb5bdfe6c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -276,11 +326,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1709421307,
|
"lastModified": 1709990107,
|
||||||
"narHash": "sha256-8jG7XToXTQHYWBaaNRoALxcEPoE+yE5dKHvb2gErjOg=",
|
"narHash": "sha256-fuAqFR/lGwKOxMw7wCK7xzUv/JhS8v9bdNQJ9KCE5HQ=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs-wayland",
|
"repo": "nixpkgs-wayland",
|
||||||
"rev": "ea91a1d89e6f237d2369ad0de846785965cbef0b",
|
"rev": "c737af27135864461e68214f7bbe9222f7d859fb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -336,6 +386,21 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems_2": {
|
"systems_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1689347949,
|
||||||
|
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default-linux",
|
||||||
|
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default-linux",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681028828,
|
"lastModified": 1681028828,
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
@ -375,18 +440,18 @@
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"host": "gitlab.freedesktop.org",
|
"host": "gitlab.freedesktop.org",
|
||||||
"lastModified": 1708558866,
|
"lastModified": 1709983277,
|
||||||
"narHash": "sha256-Mz6hCtommq7RQfcPnxLINigO4RYSNt23HeJHC6mVmWI=",
|
"narHash": "sha256-wXWIJLd4F2JZeMaihWVDW/yYXCLEC8OpeNJZg9a9ly8=",
|
||||||
"owner": "wlroots",
|
"owner": "wlroots",
|
||||||
"repo": "wlroots",
|
"repo": "wlroots",
|
||||||
"rev": "0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5",
|
"rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b",
|
||||||
"type": "gitlab"
|
"type": "gitlab"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"host": "gitlab.freedesktop.org",
|
"host": "gitlab.freedesktop.org",
|
||||||
"owner": "wlroots",
|
"owner": "wlroots",
|
||||||
"repo": "wlroots",
|
"repo": "wlroots",
|
||||||
"rev": "0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5",
|
"rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b",
|
||||||
"type": "gitlab"
|
"type": "gitlab"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -410,11 +475,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1708696469,
|
"lastModified": 1709299639,
|
||||||
"narHash": "sha256-shh5wmpeYy3MmsBfkm4f76yPsBDGk6OLYRVG+ARy2F0=",
|
"narHash": "sha256-jYqJM5khksLIbqSxCLUUcqEgI+O2LdlSlcMEBs39CAU=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "xdg-desktop-portal-hyprland",
|
"repo": "xdg-desktop-portal-hyprland",
|
||||||
"rev": "1b713911c2f12b96c2574474686e4027ac4bf826",
|
"rev": "2d2fb547178ec025da643db57d40a971507b82fe",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkIfIn;
|
inherit (lib) mkIfIn;
|
||||||
cfg = config.oizys.languages;
|
cfg = config.oizys.languages;
|
||||||
|
pixi = pkgs.callPackage ../../pkgs/pixi.nix {};
|
||||||
in {
|
in {
|
||||||
config = mkIfIn "python" cfg {
|
config = mkIfIn "python" cfg {
|
||||||
environment.systemPackages = let
|
environment.systemPackages = let
|
||||||
|
|
|
@ -17,6 +17,14 @@ proc error(args: varargs[string, `$`]) =
|
||||||
args.join("")
|
args.join("")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
proc warn(args: varargs[string, `$`]) =
|
||||||
|
stdout.styledWriteLine(
|
||||||
|
fgCyan, "oizys", resetStyle, "|",
|
||||||
|
fgYellow, "WARN", resetStyle, "| ",
|
||||||
|
args.join("")
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
type
|
type
|
||||||
OizysContext = object
|
OizysContext = object
|
||||||
flake, host: string
|
flake, host: string
|
||||||
|
@ -43,7 +51,13 @@ proc check(c: OizysContext) =
|
||||||
info "host: ", c.host
|
info "host: ", c.host
|
||||||
|
|
||||||
proc cmd(c: OizysContext): string {.inline.} =
|
proc cmd(c: OizysContext): string {.inline.} =
|
||||||
if c.pinix: "pix" else: "nix"
|
let pixExists = findExe("pix") != ""
|
||||||
|
if c.pinix:
|
||||||
|
if pixExists:
|
||||||
|
return "pix"
|
||||||
|
else:
|
||||||
|
warn "pinix not found, falling back to nix"
|
||||||
|
return "nix"
|
||||||
|
|
||||||
proc systemFlakePath(c: OizysContext): string =
|
proc systemFlakePath(c: OizysContext): string =
|
||||||
c.flake & "#nixosConfigurations." & c.host & ".config.system.build.toplevel"
|
c.flake & "#nixosConfigurations." & c.host & ".config.system.build.toplevel"
|
||||||
|
|
76
pkgs/pixi.nix
Normal file
76
pkgs/pixi.nix
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, rustPlatform
|
||||||
|
, fetchFromGitHub
|
||||||
|
, pkg-config
|
||||||
|
, openssl
|
||||||
|
, installShellFiles
|
||||||
|
, darwin
|
||||||
|
, testers
|
||||||
|
, pixi
|
||||||
|
}:
|
||||||
|
|
||||||
|
rustPlatform.buildRustPackage rec {
|
||||||
|
pname = "pixi";
|
||||||
|
version = "0.15.2";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "prefix-dev";
|
||||||
|
repo = "pixi";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-bh8Uu6Q2AND50Qzivc6k1Z8JWudkHC2i4YW1Hxa69SM=";
|
||||||
|
};
|
||||||
|
|
||||||
|
cargoHash = "sha256-yMIcPwnuN7F2ZrOtJw8T+nxeSzLsYn+iC34bYeWpi/w=";
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
pkg-config
|
||||||
|
installShellFiles
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
openssl
|
||||||
|
]
|
||||||
|
++ lib.optionals stdenv.isDarwin (
|
||||||
|
with darwin.apple_sdk_11_0.frameworks; [ CoreFoundation IOKit SystemConfiguration Security ]
|
||||||
|
);
|
||||||
|
|
||||||
|
# There are some CI failures with Rattler. Tests on Aarch64 has been skipped.
|
||||||
|
# See https://github.com/prefix-dev/pixi/pull/241.
|
||||||
|
doCheck = !stdenv.isAarch64;
|
||||||
|
|
||||||
|
preCheck = ''
|
||||||
|
export HOME="$(mktemp -d)"
|
||||||
|
'';
|
||||||
|
|
||||||
|
checkFlags = [
|
||||||
|
# Skip tests requiring network
|
||||||
|
"--skip=add_channel"
|
||||||
|
"--skip=add_functionality"
|
||||||
|
"--skip=add_functionality_os"
|
||||||
|
"--skip=add_functionality_union"
|
||||||
|
"--skip=add_pypi_functionality"
|
||||||
|
"--skip=test_alias"
|
||||||
|
"--skip=test_cwd"
|
||||||
|
"--skip=test_incremental_lock_file"
|
||||||
|
];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
installShellCompletion --cmd pix \
|
||||||
|
--bash <($out/bin/pixi completion --shell bash) \
|
||||||
|
--fish <($out/bin/pixi completion --shell fish) \
|
||||||
|
--zsh <($out/bin/pixi completion --shell zsh)
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru.tests.version = testers.testVersion {
|
||||||
|
package = pixi;
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Package management made easy";
|
||||||
|
homepage = "https://pixi.sh/";
|
||||||
|
license = licenses.bsd3;
|
||||||
|
maintainers = with lib.maintainers; [ aaronjheng edmundmiller ];
|
||||||
|
mainProgram = "pixi";
|
||||||
|
};
|
||||||
|
}
|
3
todo.md
3
todo.md
|
@ -1,6 +1,7 @@
|
||||||
# oizys todo's
|
# oizys todo's
|
||||||
|
|
||||||
- [ ] add graceful fall back for oizys-cli if pinix isn't installed system-wide yet
|
- [-] add graceful fall back for oizys-cli if pinix isn't installed system-wide yet
|
||||||
- [ ] trackdown wezterm bug... (try building from flake?)
|
- [ ] trackdown wezterm bug... (try building from flake?)
|
||||||
|
> https://github.com/wez/wezterm/issues/5067
|
||||||
|
|
||||||
<!-- generated with <3 by daylinmorgan/todo -->
|
<!-- generated with <3 by daylinmorgan/todo -->
|
||||||
|
|
Loading…
Reference in a new issue