Switch to flake-based build on nix-builder for nightly rust.
This commit is contained in:
@@ -2,56 +2,10 @@
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
nix_builder,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
# patchScriptBin =
|
||||
# {
|
||||
# filename,
|
||||
# contents,
|
||||
# path ? [ ],
|
||||
# }:
|
||||
# ((pkgs.writeScriptBin filename contents).overrideAttrs (old: {
|
||||
# buildInputs = [ pkgs.makeWrapper ];
|
||||
# buildCommand = "${old.buildCommand}\n patchShebangs $out\nwrapProgram $out/bin/${filename} --prefix PATH : ${lib.makeBinPath path}";
|
||||
# }));
|
||||
nix_builder = pkgs.rustPlatform.buildRustPackage rec {
|
||||
pname = "nix_builder";
|
||||
version = "0.0.0";
|
||||
|
||||
src = pkgs.fetchgit {
|
||||
url = "https://code.fizz.buzz/talexander/nix_builder.git";
|
||||
# tag = version;
|
||||
rev = "606832f505a1ccc9702cd12c236c3188f9282e82";
|
||||
hash = "sha256-WHvnkCIPDBw0BnrQMnBpmwmYuhlxR4FfkoNWw2DY6XE=";
|
||||
leaveDotGit = false;
|
||||
};
|
||||
|
||||
cargoLock = {
|
||||
lockFile = "${src}/Cargo.lock";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "A builder of nix configs for a build server.";
|
||||
homepage = "https://code.fizz.buzz/talexander/nix_builder";
|
||||
license = licenses.bsd0;
|
||||
maintainers = [ ];
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/nix-builder --prefix PATH : ${
|
||||
lib.makeBinPath [
|
||||
pkgs.git
|
||||
pkgs.nix
|
||||
pkgs.nixos-rebuild
|
||||
]
|
||||
}
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
@@ -66,7 +20,7 @@ in
|
||||
|
||||
config = lib.mkIf config.me.hydra.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
nix_builder
|
||||
nix_builder.packages.x86_64-linux.default
|
||||
sqlite # For manually inspecting the database.
|
||||
];
|
||||
|
||||
@@ -142,7 +96,7 @@ in
|
||||
IFS=$'\n\t'
|
||||
DIR="$( cd "$( dirname "''${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
NIX_REMOTE='local?root=/.disk/root' RUST_BACKTRACE=1 RUST_LOG=nix_builder=DEBUG ${nix_builder}/bin/nix-builder build --config ${./files/nix_builder.toml} ${builtins.concatStringsSep " " build_flags}
|
||||
NIX_REMOTE='local?root=/.disk/root' RUST_BACKTRACE=1 RUST_LOG=nix_builder=DEBUG ${nix_builder.packages.x86_64-linux.default}/bin/nix-builder build --config ${./files/nix_builder.toml} ${builtins.concatStringsSep " " build_flags}
|
||||
'';
|
||||
restartIfChanged = false;
|
||||
serviceConfig = {
|
||||
|
||||
Reference in New Issue
Block a user