generated from Luis/nextjs-python-web-template
use callPackage for merge-after-ci, nix-unit & tea-create-pr
This commit is contained in:
@@ -25,10 +25,8 @@
|
|||||||
./templates/flake-module.nix
|
./templates/flake-module.nix
|
||||||
./templates/python-project/flake-module.nix
|
./templates/python-project/flake-module.nix
|
||||||
./pkgs/clan-cli/flake-module.nix
|
./pkgs/clan-cli/flake-module.nix
|
||||||
./pkgs/nix-unit/flake-module.nix
|
|
||||||
./pkgs/installer/flake-module.nix
|
./pkgs/installer/flake-module.nix
|
||||||
./pkgs/tea-create-pr
|
./pkgs/flake-module.nix
|
||||||
./pkgs/merge-after-ci
|
|
||||||
./lib/flake-module.nix
|
./lib/flake-module.nix
|
||||||
({ self, lib, ... }: {
|
({ self, lib, ... }: {
|
||||||
flake.nixosModules = lib.mapAttrs (_: nix: { imports = [ nix ]; }) (self.lib.findNixFiles ./nixosModules);
|
flake.nixosModules = lib.mapAttrs (_: nix: { imports = [ nix ]; }) (self.lib.findNixFiles ./nixosModules);
|
||||||
|
|||||||
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 @@
|
|||||||
{
|
{ writeShellApplication
|
||||||
perSystem =
|
, coreutils
|
||||||
{ pkgs
|
, bash
|
||||||
, self'
|
, git
|
||||||
, ...
|
, tea
|
||||||
}:
|
, openssh
|
||||||
let
|
, tea-create-pr
|
||||||
name = builtins.baseNameOf ./.;
|
, ...
|
||||||
script = pkgs.writeShellApplication {
|
}:
|
||||||
inherit name;
|
writeShellApplication {
|
||||||
runtimeInputs = [
|
name = "merge-after-ci";
|
||||||
pkgs.bash
|
runtimeInputs = [
|
||||||
pkgs.coreutils
|
bash
|
||||||
pkgs.git
|
coreutils
|
||||||
pkgs.tea
|
git
|
||||||
pkgs.openssh
|
tea
|
||||||
self'.packages.tea-create-pr
|
openssh
|
||||||
];
|
tea-create-pr
|
||||||
text = ''
|
];
|
||||||
bash ${./script.sh} "$@"
|
text = ''
|
||||||
'';
|
bash ${./script.sh} "$@"
|
||||||
};
|
'';
|
||||||
in
|
|
||||||
{
|
|
||||||
packages.${name} = script;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
perSystem = { pkgs, ... }: {
|
|
||||||
packages.nix-unit = pkgs.callPackage ./default.nix { };
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,26 +1,20 @@
|
|||||||
{
|
{ writeShellApplication
|
||||||
perSystem =
|
, bash
|
||||||
{ pkgs
|
, coreutils
|
||||||
, ...
|
, git
|
||||||
}:
|
, tea
|
||||||
let
|
, openssh
|
||||||
name = builtins.baseNameOf ./.;
|
}:
|
||||||
script = pkgs.writeShellApplication {
|
writeShellApplication {
|
||||||
inherit name;
|
name = "tea-create-pr";
|
||||||
runtimeInputs = [
|
runtimeInputs = [
|
||||||
pkgs.bash
|
bash
|
||||||
pkgs.coreutils
|
coreutils
|
||||||
pkgs.git
|
git
|
||||||
pkgs.tea
|
tea
|
||||||
pkgs.openssh
|
openssh
|
||||||
];
|
];
|
||||||
text = ''
|
text = ''
|
||||||
export EDITOR=${pkgs.vim}/bin/vim
|
bash ${./script.sh} "$@"
|
||||||
bash ${./script.sh} "$@"
|
'';
|
||||||
'';
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
packages.${name} = script;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user