refac: move package builder to a separate file
This commit is contained in:
parent
db26eb7213
commit
bb99c5585b
3 changed files with 11 additions and 10 deletions
3
default.nix
Normal file
3
default.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
(import (fetchTarball https://github.com/edolstra/flake-compat/archive/master.tar.gz) {
|
||||||
|
src = builtins.fetchGit ./.;
|
||||||
|
}).defaultNix
|
11
flake.nix
11
flake.nix
|
@ -5,16 +5,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { nixpkgs, flake-utils, ... }:
|
outputs = { nixpkgs, flake-utils, ... }:
|
||||||
let
|
let mkWd2 = import ./wd2.nix; in
|
||||||
inherit (builtins) readFile;
|
|
||||||
|
|
||||||
mkWd2 = { writeShellApplication, symlinkJoin, d2, ... }:
|
|
||||||
writeShellApplication {
|
|
||||||
name = "wd2";
|
|
||||||
runtimeInputs = [ d2 ];
|
|
||||||
text = (readFile ./wd2);
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
overlays = {
|
overlays = {
|
||||||
default = final: prev: {
|
default = final: prev: {
|
||||||
|
|
7
wd2.nix
Normal file
7
wd2.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ writeShellApplication, d2, ... }:
|
||||||
|
|
||||||
|
writeShellApplication {
|
||||||
|
name = "wd2";
|
||||||
|
runtimeInputs = [ d2 ];
|
||||||
|
text = builtins.readFile ./wd2;
|
||||||
|
}
|
Loading…
Reference in a new issue