use callPackage for merge-after-ci, nix-unit & tea-create-pr
This commit is contained in:
11
pkgs/flake-module.nix
Normal file
11
pkgs/flake-module.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ ... }: {
|
||||
perSystem = { pkgs, config, ... }: {
|
||||
packages = {
|
||||
tea-create-pr = pkgs.callPackage ./tea-create-pr { };
|
||||
merge-after-ci = pkgs.callPackage ./merge-after-ci {
|
||||
inherit (config.packages) tea-create-pr;
|
||||
};
|
||||
nix-unit = pkgs.callPackage ./nix-unit { };
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,27 +1,23 @@
|
||||
{
|
||||
perSystem =
|
||||
{ pkgs
|
||||
, self'
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
name = builtins.baseNameOf ./.;
|
||||
script = pkgs.writeShellApplication {
|
||||
inherit name;
|
||||
runtimeInputs = [
|
||||
pkgs.bash
|
||||
pkgs.coreutils
|
||||
pkgs.git
|
||||
pkgs.tea
|
||||
pkgs.openssh
|
||||
self'.packages.tea-create-pr
|
||||
];
|
||||
text = ''
|
||||
bash ${./script.sh} "$@"
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
packages.${name} = script;
|
||||
};
|
||||
{ writeShellApplication
|
||||
, coreutils
|
||||
, bash
|
||||
, git
|
||||
, tea
|
||||
, openssh
|
||||
, tea-create-pr
|
||||
, ...
|
||||
}:
|
||||
writeShellApplication {
|
||||
name = "merge-after-ci";
|
||||
runtimeInputs = [
|
||||
bash
|
||||
coreutils
|
||||
git
|
||||
tea
|
||||
openssh
|
||||
tea-create-pr
|
||||
];
|
||||
text = ''
|
||||
bash ${./script.sh} "$@"
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
perSystem = { pkgs, ... }: {
|
||||
packages.nix-unit = pkgs.callPackage ./default.nix { };
|
||||
};
|
||||
}
|
||||
@@ -1,26 +1,20 @@
|
||||
{
|
||||
perSystem =
|
||||
{ pkgs
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
name = builtins.baseNameOf ./.;
|
||||
script = pkgs.writeShellApplication {
|
||||
inherit name;
|
||||
runtimeInputs = [
|
||||
pkgs.bash
|
||||
pkgs.coreutils
|
||||
pkgs.git
|
||||
pkgs.tea
|
||||
pkgs.openssh
|
||||
];
|
||||
text = ''
|
||||
export EDITOR=${pkgs.vim}/bin/vim
|
||||
bash ${./script.sh} "$@"
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
packages.${name} = script;
|
||||
};
|
||||
{ writeShellApplication
|
||||
, bash
|
||||
, coreutils
|
||||
, git
|
||||
, tea
|
||||
, openssh
|
||||
}:
|
||||
writeShellApplication {
|
||||
name = "tea-create-pr";
|
||||
runtimeInputs = [
|
||||
bash
|
||||
coreutils
|
||||
git
|
||||
tea
|
||||
openssh
|
||||
];
|
||||
text = ''
|
||||
bash ${./script.sh} "$@"
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user