merge-after-ci, tea-create-pr: use writeShellApplication

This commit is contained in:
lassulus
2023-07-28 16:48:13 +02:00
parent 6d0dd33ff1
commit 0adf78de2c
2 changed files with 14 additions and 15 deletions

View File

@@ -1,26 +1,25 @@
{ {
perSystem = perSystem =
{ config { pkgs
, pkgs
, self' , self'
, ... , ...
}: }:
let let
name = builtins.baseNameOf ./.; name = builtins.baseNameOf ./.;
script = config.writers.writePureShellScriptBin script = pkgs.writeShellApplication {
name inherit name;
[ runtimeInputs = [
pkgs.bash pkgs.bash
pkgs.coreutils pkgs.coreutils
pkgs.git pkgs.git
pkgs.tea pkgs.tea
pkgs.openssh pkgs.openssh
self'.packages.tea-create-pr self'.packages.tea-create-pr
] ];
'' text = ''
export EDITOR=${pkgs.vim}/bin/vim
bash ${./script.sh} "$@" bash ${./script.sh} "$@"
''; '';
};
in in
{ {
packages.${name} = script; packages.${name} = script;

View File

@@ -1,24 +1,24 @@
{ {
perSystem = perSystem =
{ config { pkgs
, pkgs
, ... , ...
}: }:
let let
name = builtins.baseNameOf ./.; name = builtins.baseNameOf ./.;
script = config.writers.writePureShellScriptBin script = pkgs.writeShellApplication {
name inherit name;
[ runtimeInputs = [
pkgs.bash pkgs.bash
pkgs.coreutils pkgs.coreutils
pkgs.git pkgs.git
pkgs.tea pkgs.tea
pkgs.openssh pkgs.openssh
] ];
'' text = ''
export EDITOR=${pkgs.vim}/bin/vim export EDITOR=${pkgs.vim}/bin/vim
bash ${./script.sh} "$@" bash ${./script.sh} "$@"
''; '';
};
in in
{ {
packages.${name} = script; packages.${name} = script;