mirror of
https://github.com/nix-community/nixos-generators.git
synced 2024-08-16 23:51:00 +03:00
on nixpkgs versions prior to the commit that changed config.system.build's type from a lazy attribute set to a submodule. Prior to this type change, there is no system.build.kexec_tarball option declared, so the NixOS module system does not resolve priorities/overrides in the config.build.kexec_tarball definition. That is, with lib.mkForce, the config.build.kexec_tarball definition ends up being something like: { _type = "override"; content = <...>; priority = 50; } Removing lib.mkForce allows us to successfully and sensibly interpolate the value (== outPath) of system.build.kexec_tarball in system.build.kexec_bundle's builder script. Likewise, no lib.mkOverride for system.build.raw.
16 lines
420 B
Makefile
16 lines
420 B
Makefile
PREFIX ?= /usr/local
|
|
SHARE ?= $(PREFIX)/share/nixos-generator
|
|
|
|
all:
|
|
|
|
SOURCES = formats format-module.nix configuration.nix lib.nix nixos-generate.nix
|
|
|
|
install:
|
|
mkdir -p $(PREFIX)/bin $(SHARE)
|
|
sed \
|
|
-e "s|libexec_dir=\".*\"|libexec_dir=\"$(SHARE)\"|" \
|
|
-e "s|#!/usr/bin/env.*|#!/usr/bin/env bash|" \
|
|
nixos-generate > $(PREFIX)/bin/nixos-generate
|
|
chmod 755 $(PREFIX)/bin/nixos-generate
|
|
cp -r $(SOURCES) $(SHARE)
|