refac: move package builder to a separate file

This commit is contained in:
Dmitriy Pleshevskiy 2023-04-03 16:40:55 +03:00
parent db26eb7213
commit bb99c5585b
Signed by: pleshevskiy
GPG Key ID: 79C4487B44403985
3 changed files with 11 additions and 10 deletions

3
default.nix Normal file
View File

@ -0,0 +1,3 @@
(import (fetchTarball https://github.com/edolstra/flake-compat/archive/master.tar.gz) {
src = builtins.fetchGit ./.;
}).defaultNix

View File

@ -5,16 +5,7 @@
};
outputs = { nixpkgs, flake-utils, ... }:
let
inherit (builtins) readFile;
mkWd2 = { writeShellApplication, symlinkJoin, d2, ... }:
writeShellApplication {
name = "wd2";
runtimeInputs = [ d2 ];
text = (readFile ./wd2);
};
in
let mkWd2 = import ./wd2.nix; in
{
overlays = {
default = final: prev: {

7
wd2.nix Normal file
View File

@ -0,0 +1,7 @@
{ writeShellApplication, d2, ... }:
writeShellApplication {
name = "wd2";
runtimeInputs = [ d2 ];
text = builtins.readFile ./wd2;
}