forked from lix-project/nixos-module
Allow use of lix from nixpkgs
Change behaviour of module. Allow not specifying LixSrc and provide fallback to nixpkgs.pkgs.lix
This commit is contained in:
parent
d70318fb94
commit
a537be487b
|
@ -1,5 +1,5 @@
|
||||||
{ lix, versionSuffix ? "" }:
|
{ lixSrc ? null, versionSuffix ? "" }:
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [ (import ./overlay.nix { inherit lix versionSuffix; }) ];
|
nixpkgs.overlays = [ (import ./overlay.nix { inherit lixSrc versionSuffix; }) ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,15 @@
|
||||||
{ lix, versionSuffix ? "" }:
|
{ lixSrc ? null, versionSuffix ? "" }:
|
||||||
final: prev:
|
final: prev:
|
||||||
let
|
let
|
||||||
# This is kind of scary to not override the nix version to pretend to be
|
# This is kind of scary to not override the nix version to pretend to be
|
||||||
# 2.18 since nixpkgs can introduce new breakage in its Nix unstable CLI
|
# 2.18 since nixpkgs can introduce new breakage in its Nix unstable CLI
|
||||||
# usage.
|
# usage.
|
||||||
# https://github.com/nixos/nixpkgs/blob/6afb255d976f85f3359e4929abd6f5149c323a02/nixos/modules/config/nix.nix#L121
|
# https://github.com/nixos/nixpkgs/blob/6afb255d976f85f3359e4929abd6f5149c323a02/nixos/modules/config/nix.nix#L121
|
||||||
lixPkg = final.callPackage (lix + "/package.nix") ({
|
lixPkg =
|
||||||
|
if lixSrc == null
|
||||||
|
then prev.pkgs.lix
|
||||||
|
else
|
||||||
|
final.callPackage (lixSrc + "/package.nix") ({
|
||||||
versionSuffix = "-${versionSuffix}";
|
versionSuffix = "-${versionSuffix}";
|
||||||
# FIXME: do this more sensibly for future releases
|
# FIXME: do this more sensibly for future releases
|
||||||
# https://git.lix.systems/lix-project/lix/issues/406
|
# https://git.lix.systems/lix-project/lix/issues/406
|
||||||
|
|
Loading…
Reference in a new issue