3p/tvl: more refactoring to plumb system through
This commit is contained in:
parent
cefe8f4b96
commit
d9971b39c5
2 changed files with 8 additions and 4 deletions
|
@ -9,10 +9,12 @@
|
||||||
let
|
let
|
||||||
inherit (pkgs) bat runCommand;
|
inherit (pkgs) bat runCommand;
|
||||||
in
|
in
|
||||||
runCommand "bat-syntaxes.bin" { } ''
|
runCommand "bat-syntaxes.bin" {
|
||||||
|
nativeBuildInputs = [ bat ];
|
||||||
|
} ''
|
||||||
export HOME=$PWD
|
export HOME=$PWD
|
||||||
mkdir -p .config/bat/syntaxes
|
mkdir -p .config/bat/syntaxes
|
||||||
cp ${./Prolog.sublime-syntax} .config/bat/syntaxes
|
cp ${./Prolog.sublime-syntax} .config/bat/syntaxes
|
||||||
${bat}/bin/bat cache --build
|
bat cache --build
|
||||||
mv .cache/bat/syntaxes.bin $out
|
mv .cache/bat/syntaxes.bin $out
|
||||||
''
|
''
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
{ depot ? { }, externalArgs ? { }, depotOverlays ? true, ... }:
|
{ depot ? { }, externalArgs ? { }, depotOverlays ? true, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
system = if externalArgs ? nixpkgsSystem then externalArgs.nixpkgsSystem else builtins.currentSystem;
|
||||||
|
|
||||||
# import the nixos-unstable package set, or optionally use the
|
# import the nixos-unstable package set, or optionally use the
|
||||||
# source (e.g. a path) specified by the `nixpkgsBisectPath`
|
# source (e.g. a path) specified by the `nixpkgsBisectPath`
|
||||||
# argument. This is intended for use-cases where the depot is
|
# argument. This is intended for use-cases where the depot is
|
||||||
|
@ -20,7 +22,7 @@ let
|
||||||
|
|
||||||
# Stable package set is imported, but not exposed, to overlay
|
# Stable package set is imported, but not exposed, to overlay
|
||||||
# required packages into the unstable set.
|
# required packages into the unstable set.
|
||||||
stableNixpkgs = import depot.third_party.sources.nixpkgs-stable { };
|
stableNixpkgs = import depot.third_party.sources.nixpkgs-stable { inherit system; };
|
||||||
|
|
||||||
# Overlay for packages that should come from the stable channel
|
# Overlay for packages that should come from the stable channel
|
||||||
# instead (e.g. because something is broken in unstable).
|
# instead (e.g. because something is broken in unstable).
|
||||||
|
@ -47,7 +49,7 @@ import nixpkgsSrc {
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
allowBroken = true;
|
allowBroken = true;
|
||||||
};
|
};
|
||||||
system = if externalArgs ? nixpkgsSystem then externalArgs.nixpkgsSystem else builtins.currentSystem;
|
inherit system;
|
||||||
|
|
||||||
overlays = [
|
overlays = [
|
||||||
commitsOverlay
|
commitsOverlay
|
||||||
|
|
Loading…
Reference in a new issue