nix-files/pkgs/additional/sops-nix/default.nix

37 lines
929 B
Nix

{ pkgs
, fetchFromGitHub
, nix-update-script
}:
let
src = fetchFromGitHub {
owner = "Mic92";
repo = "sops-nix";
rev = "d4555e80d80d2fa77f0a44201ca299f9602492a0";
hash = "sha256-8Q6mKSsto8gaGczXd4G0lvawdAYLa5Dlh3/g4hl5CaM=";
};
flake = import "${src}/flake.nix";
evaluated = flake.outputs {
self = evaluated;
nixpkgs = pkgs;
nixpkgs-stable = pkgs; #< shameless lie :)
};
overlay = evaluated.overlays.default;
final = pkgs.appendOverlays [ overlay ];
in src.overrideAttrs (base: {
# attributes required by update scripts
pname = "sops-nix";
# nix-update-script insists on this weird `assets-` version format
version = "assets-unstable-2024-06-03";
src = src;
passthru = base.passthru
// (overlay final pkgs)
// { inherit (evaluated) nixosModules; }
// {
updateScript = nix-update-script {
extraArgs = [ "--version" "branch" ];
};
}
;
})