Skip to content

Commit

Permalink
refactor: update ops unit
Browse files Browse the repository at this point in the history
  • Loading branch information
GTrunSec committed Oct 30, 2023
1 parent fa24d68 commit 89a8fa4
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 39 deletions.
19 changes: 18 additions & 1 deletion flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nixpkgs-julia.url = "github:NixOS/nixpkgs/?ref=refs/pull/225513/head";
nixpkgs-lock.url = "github:NixOS/nixpkgs/0cfb3c002b61807ca0bab3efe514476bdf2e5478";
call-flake.url = "github:divnix/call-flake";
};
outputs =
Expand All @@ -14,15 +15,16 @@
"aarch64-linux"
"aarch64-darwin"
];
src = std.inputs.omnibus.inputs.flops.haumea.pops.default.setInit {
load = {
src = ./nix/src;
units = std.inputs.omnibus.inputs.flops.lib.haumea.pops.default.setInit {
src = ./nix/units;
inputs = {
inputs = std.inputs // inputs;
};
};
in
(eachSystem (system: std.${system}))
// {
inherit units;
inherit (std)
lib
packages
Expand Down
20 changes: 10 additions & 10 deletions julia2nix.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,18 @@ sha256 = "sha256-27PVVCJaJplznvzgGGwQE3ksOuaUarHOYmDfMKSbUug="
stripRoot = false
url = "https://pkg.julialang.org/artifact/dc526f26fb179a3f68eb13fcbe5d2d2a5aa7eeac#artifact.tar.gz"

[depot.x86_64-linux.fetchzip.package-OpenSSL]
name = "packages/OpenSSL/kra0W"
sha256 = "sha256-muCjqNy2lqSc78Tzv7q4G9vsYHNcv+olkqf8j1CbGiQ="
[depot.x86_64-linux.fetchzip.registry-General]
name = "registries/General"
sha256 = "sha256-TAtVB22NVCRBJyHR3H2owLZLpGo8pq65hTqxxXaYt14="
stripRoot = false
url = "https://pkg.julialang.org/package/4d8831e6-92b7-49fb-bdf8-b643e874388c/df6830e37943c7aaa10023471ca47fb3065cc3c4#package.tar.gz"
url = "https://pkg.julialang.org/registry/23338594-aafe-5451-b93e-139f81909106/baadbc3ca6fd7b55dedd2b64fef79efa5146474e#registry.tar.gz"

[depot.x86_64-linux.fetchzip.artifact-33c5e3a13ad6427f86436f577c0edce1e468ac80]
name = "artifacts/33c5e3a13ad6427f86436f577c0edce1e468ac80"
sha256 = "sha256-yHv+b8WLS2yJKgp6tbVsvEtiki5DNBKGuXiNaRjo+Oo="
stripRoot = false
url = "https://pkg.julialang.org/artifact/33c5e3a13ad6427f86436f577c0edce1e468ac80#artifact.tar.gz"

[depot.x86_64-linux.fetchzip.registry-General]
name = "registries/General"
sha256 = "sha256-NQM4+e9O5BFdeeqsr8OMKnFDdRIy79zOQjPOpdR83es="
stripRoot = false
url = "https://pkg.julialang.org/registry/23338594-aafe-5451-b93e-139f81909106/aa3b04713a506a40072b9f0f5f83ab8d80f560bc#registry.tar.gz"

[depot.x86_64-linux.fetchzip.artifact-53037ac9d528ee46c3526799b407ee52b7c224f3]
name = "artifacts/53037ac9d528ee46c3526799b407ee52b7c224f3"
sha256 = "sha256-nwKbETHxBT7fWziDE/6u+ZJvS/ULH7ewT2llzACAtps="
Expand Down Expand Up @@ -95,6 +89,12 @@ sha256 = "sha256-OdydL0kBs0anNG3UFioPiYbElCc/nohJutG/gKFhwUw="
rev = "6466e524967496866901a78fca3f2e9ea445a559"
url = "https://github.com/JuliaData/Parsers.jl.git"

[depot.x86_64-linux.fetchgit.package-OpenSSL]
name = "packages/OpenSSL/kra0W"
sha256 = "sha256-muCjqNy2lqSc78Tzv7q4G9vsYHNcv+olkqf8j1CbGiQ="
rev = "df6830e37943c7aaa10023471ca47fb3065cc3c4"
url = "https://github.com/JuliaWeb/OpenSSL.jl.git"

[depot.x86_64-linux.fetchgit.package-MbedTLS]
name = "packages/MbedTLS/lqmet"
sha256 = "sha256-X0cj/771qRxyVLloNLlhtrQkKKcVWlQxmqxSGVMYCII="
Expand Down
1 change: 1 addition & 0 deletions nix/std/cells/julia2nix/overlays/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
old.preInstall
+ ''
cp -r ${args.src} $out/src
export nixpkgs-prefetch=${inputs.main.inputs.nixpkgs-lock.path}"
'';

makeWrapperArgs = [ "--add-flags --project=${placeholder "out"}/src" ];
Expand Down
12 changes: 6 additions & 6 deletions nix/std/cells/julia2nix/packages/default.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{ inputs, cell }:
let
inherit (inputs) std self toplevel;
inherit (inputs) std self main;

l = inputs.nixpkgs.lib // builtins;

src = std.incl toplevel [
src = std.incl main [
"src"
"julia2nix.toml"
"Project.toml"
Expand Down Expand Up @@ -73,11 +73,11 @@ in
};

build-depot = cell.lib.buildDepot {
julia2nix = "${std.incl inputs.toplevel [ "julia2nix.toml" ]}/julia2nix.toml";
julia2nix = "${std.incl inputs.main [ "julia2nix.toml" ]}/julia2nix.toml";
};

build-conda = cell.lib.buildEnv {
src = "${std.incl inputs.toplevel [ "testenv" ]}/testenv/conda";
src = "${std.incl inputs.main [ "testenv" ]}/testenv/conda";
name = "build-conda";
package = cell.packages.julia-wrapped;
extraInstallPhase = with nixpkgs; "";
Expand All @@ -101,7 +101,7 @@ in
name = "julia2nix";
runtimeInputs = [ cell.packages.build-project ];
text = ''
export NIX_PATH=${inputs.nixpkgs-lock.outPath}
export NIX_PATH=${inputs.main.inputs.nixpkgs-lock.outPath}
julia ${std.incl self [ "testenv" ]}/testenv/writejulia2nix.jl ${nixpkgs.system}
'';
};
Expand All @@ -110,7 +110,7 @@ in
name = "julia2nix-write-all-systems";
runtimeInputs = [ cell.packages.build-project ];
text = ''
export NIX_PATH=${inputs.nixpkgs-lock.outPath}
export NIX_PATH=${inputs.main.inputs.nixpkgs-lock.outPath}
julia ${std.incl self [ "testenv" ]}/testenv/writejulia2nix.jl
'';
};
Expand Down
17 changes: 0 additions & 17 deletions nix/std/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions nix/std/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nix-filter.url = "github:/numtide/nix-filter";
# TOOD: use the locked prefetch version, will be removed by replacing with nix-prefetch-url
nixpkgs-lock.url = "github:NixOS/nixpkgs/0cfb3c002b61807ca0bab3efe514476bdf2e5478";
};

inputs = {
Expand All @@ -25,7 +24,7 @@
(std.growOn
{
inputs = inputs // {
toplevel = ../..;
main = ../..;
};
cellsFrom = ./cells;
systems = [
Expand Down
14 changes: 14 additions & 0 deletions nix/units/ops/jupyenv.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{ inputs }:
let
inherit (inputs) omnibus;
inherit
(omnibus.lib.errors.requiredInputs inputs "jupyenv.pops" [
"nixpkgs"
"jupyenv"
])
nixpkgs
jupyenv
;
inherit (jupyenv.lib.${nixpkgs.system}) mkJupyterlabNew;
in
{ }

0 comments on commit 89a8fa4

Please sign in to comment.