pkgs: migrate to nilla
This commit is contained in:
parent
e8744a168b
commit
79a4ee511e
5 changed files with 93 additions and 89 deletions
|
@ -1,35 +1,52 @@
|
|||
{ inputs, ... }:
|
||||
let
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
builder = "nixpkgs-flake";
|
||||
mkPackage = package: {
|
||||
inherit systems package builder;
|
||||
};
|
||||
|
||||
in
|
||||
{ config }:
|
||||
{
|
||||
perSystem =
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
inputs',
|
||||
...
|
||||
}:
|
||||
{
|
||||
packages.conduit-next = pkgs.callPackage ./conduit {
|
||||
src = inputs.conduit-src;
|
||||
crane = inputs.crane.mkLib pkgs;
|
||||
fenix = inputs'.fenix.packages;
|
||||
};
|
||||
|
||||
packages.git-commit-last = pkgs.writeShellApplication {
|
||||
name = "git-commit-last";
|
||||
text = ''
|
||||
GITDIR="$(git rev-parse --git-dir)"
|
||||
git commit -eF "$GITDIR/COMMIT_EDITMSG"
|
||||
'';
|
||||
};
|
||||
|
||||
packages.git-fixup = pkgs.writeShellApplication {
|
||||
name = "git-fixup";
|
||||
text = ''
|
||||
git log -n 50 --pretty=format:'%h %s' --no-merges | \
|
||||
${lib.getExe pkgs.fzf} | \
|
||||
cut -c -7 | \
|
||||
xargs -o git commit --fixup
|
||||
'';
|
||||
};
|
||||
config.packages.conduit-next = {
|
||||
inherit systems builder;
|
||||
package = import ./conduit;
|
||||
settings.args = {
|
||||
src = config.inputs.conduit-src.result;
|
||||
crane = config.inputs.crane.result.mkLib;
|
||||
fenix = config.inputs.fenix.result.packages;
|
||||
};
|
||||
};
|
||||
|
||||
config.packages.git-commit-last = mkPackage (
|
||||
{ writeShellApplication }:
|
||||
writeShellApplication {
|
||||
name = "git-commit-last";
|
||||
text = ''
|
||||
GITDIR="$(git rev-parse --git-dir)"
|
||||
git commit -eF "$GITDIR/COMMIT_EDITMSG"
|
||||
'';
|
||||
}
|
||||
);
|
||||
|
||||
config.packages.git-fixup = mkPackage (
|
||||
{
|
||||
lib,
|
||||
writeShellApplication,
|
||||
fzf,
|
||||
}:
|
||||
writeShellApplication {
|
||||
name = "git-fixup";
|
||||
text = ''
|
||||
git log -n 50 --pretty=format:'%h %s' --no-merges | \
|
||||
${lib.getExe fzf} | \
|
||||
cut -c -7 | \
|
||||
xargs -o git commit --fixup
|
||||
'';
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue