pkgs: migrate to nilla

This commit is contained in:
Nikodem Rabuliński 2025-03-23 13:17:56 +01:00
parent 5d5fcac95a
commit 7c0f0ac90e
Signed by: nrabulinski
SSH key fingerprint: SHA256:eJRdE3KzMWWk9zrksGEv8+v6F+VqUVR++z2SSPyiL0I
5 changed files with 90 additions and 86 deletions

View file

@ -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
'';
}
);
}