nix: depend less on the flake input mechanism

This commit is contained in:
Primrose 2024-06-29 23:42:09 +02:00
parent 939a8856a4
commit e7b6af241f
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
5 changed files with 105 additions and 753 deletions

View file

@ -11,63 +11,20 @@
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
overlays = [
# fallback to other inputs
(_: _: inputs.nixpkgs.lib.mapAttrs (_: input: input.packages.default) inputs')
(_: _: { agenix = inputs'.agenix.packages.default; })
(final: _: {
nur = import inputs.nixnur {
pkgs = final;
nurpkgs = final;
wired = final.fetchFromGitHub {
owner = "Toqozz";
repo = "wired-notify";
rev = "0.10.6";
hash = "sha256-AWIV/+vVwDZECZ4lFMSFyuyUKJc/gb72PiBJv6lbhnc=";
};
})
# extend pkgs with my custom set
(_: _: { myPkgs = self'.packages; })
# resolve pinned pkg sets as attributes
(_: prev: {
# stackage LTS 22.22 / ghc965 (May 19 2024) / hls 2.8.0.0
ghc-pin = import (prev.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "1faadcf5147b9789aa05bdb85b35061b642500a4";
hash = "sha256-KTUFPrsI0YW/S8ZcbIAXnWI2BiGm/IGqNAFco88lBYU=";
}) { inherit system; };
alt-ergo-pin =
import
(prev.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "1b95daa381fa4a0963217a5d386433c20008208a";
hash = "sha256-vwEtkxIEQjymeTk89Ty1MGfRVSWL1/3j1wt5xB5ua88=";
})
{
inherit system;
config.allowUnfree = true;
};
neovim-pin = import (prev.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "6132b0f6e344ce2fe34fc051b72fb46e34f668e0";
hash = "sha256-7R2ZvOnvd9h8fDd65p0JnB7wXfUvreox3xFdYWd1BnY=";
}) { inherit system; };
})
# https://github.com/tmux/tmux/issues/3983
# fix tmux crashing when neovim is used in a nested session
(_: prev: {
tmux = prev.tmux.overrideAttrs (oa: {
patches = (oa.patches or [ ]) ++ [
(prev.fetchpatch {
name = "sixel-patch";
url = "https://github.com/tmux/tmux/commit/aa17f0e0c1c8b3f1d6fc8617613c74f07de66fae.patch";
hash = "sha256-jhWGnC9tsGqTTA5tU+i4G3wlwZ7HGz4P0UHl17dVRU4=";
})
];
});
})
(_: _: { myPkgs = self'.packages; }) # extend pkgs with my custom set
(import ./pins.nix)
(import ./patches.nix)
];
config.allowUnfreePredicate =

View file

@ -0,0 +1,13 @@
_: prev: {
# https://github.com/tmux/tmux/issues/3983
# fix tmux crashing when neovim is used in a nested session
tmux = prev.tmux.overrideAttrs (oa: {
patches = (oa.patches or [ ]) ++ [
(prev.fetchpatch {
name = "sixel-patch";
url = "https://github.com/tmux/tmux/commit/aa17f0e0c1c8b3f1d6fc8617613c74f07de66fae.patch";
hash = "sha256-jhWGnC9tsGqTTA5tU+i4G3wlwZ7HGz4P0UHl17dVRU4=";
})
];
});
}

46
nix/handleInputs/pins.nix Normal file
View file

@ -0,0 +1,46 @@
_: prev:
let
inherit (prev) system;
in
{
# stackage LTS 22.22 / ghc965 (May 19 2024) / hls 2.8.0.0
ghc-pin = import (prev.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "1faadcf5147b9789aa05bdb85b35061b642500a4";
hash = "sha256-KTUFPrsI0YW/S8ZcbIAXnWI2BiGm/IGqNAFco88lBYU=";
}) { inherit system; };
alt-ergo-pin =
import
(prev.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "1b95daa381fa4a0963217a5d386433c20008208a";
hash = "sha256-vwEtkxIEQjymeTk89Ty1MGfRVSWL1/3j1wt5xB5ua88=";
})
{
inherit system;
config.allowUnfree = true;
};
neovim-pin = import (prev.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "6132b0f6e344ce2fe34fc051b72fb46e34f668e0";
hash = "sha256-7R2ZvOnvd9h8fDd65p0JnB7wXfUvreox3xFdYWd1BnY=";
}) { inherit system; };
nur =
import
(prev.fetchFromGitHub {
owner = "nix-community";
repo = "nur";
rev = "9bf273a054250a990e3751cc7ae280c6ff5b4220";
hash = "sha256-2Cr9RYM276lo1a9g3QaflZy7/TxtDXpAhxWF3WsEPhQ=";
})
{
nurpkgs = prev;
pkgs = prev;
};
}