Skip to content

Commit

Permalink
fix: build nixos internal tools using new api
Browse files Browse the repository at this point in the history
  • Loading branch information
mkg20001 committed Jan 28, 2021
1 parent 6512d93 commit 123a459
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
6 changes: 3 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
description = "distinst patched for solarOS";

inputs.solaros.url = "github:ssd-solar/solaros-nix/flake";
inputs.solar.url = "github:ssd-solar/solaros-nix/flake";

outputs = { self, nixpkgs, solaros }: {
defaultPackage = solaros.lib.forAllSystems({ pkgs, ... }: pkgs.callPackage ./package.nix { inherit nixpkgs; /* TODO: inherit from solar */ });
outputs = { self, nixpkgs, solar }: {
defaultPackage = solar.lib.forAllSystems({ pkgs, ... }: pkgs.callPackage ./package.nix { nixpkgs = solar.lib.nixpkgs; });
};
}
23 changes: 15 additions & 8 deletions package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
, shellHookAppend ? "" # only used by shell.nix to add channels to NIX_PATH
, nixDistinst ? nixFlakes
, makeRustPlatform
, system
}:

let
Expand Down Expand Up @@ -51,14 +52,20 @@ let
});

tools =
with import "${path}/nixos" { configuration = {
nixpkgs.overlays = [
(self: super: {
nix = nixPatched;
})
with nixpkgs.lib.nixosSystem {
modules = [
({...}: {
nixpkgs.overlays = [
(self: super: {
nix = nixPatched;
})
];

nix.package = nixPatched;
})
];
system = "x86-64_linux";
}; };
inherit system;
};
with config.system.build;
# https://github.com/NixOS/nixpkgs/pull/87182/files?file-filters%5B%5D=.nix&file-filters%5B%5D=.sh&file-filters%5B%5D=.xml
/*
Expand All @@ -73,7 +80,7 @@ let
sed 's|nix-build|nix build|g' -i $out/bin/nixos-install
sed "s| '<nixpkgs/nixos>' -A system|-f '<nixpkgs/nixos>' system|g" -i $out/bin/nixos-install
'';
})) conf-tool /* nixos-enter manual.manpages */] ++
})) conf-tool /* nixos-enter manual.manpages */ ] ++
[ (writeShellScriptBin "nixos-install-wrapped" (builtins.readFile ./install-wrapper.sh)) ];
in
with rust; (makeRustPlatform packages.stable).buildRustPackage rec {
Expand Down

0 comments on commit 123a459

Please sign in to comment.