42 lines
904 B
Nix
42 lines
904 B
Nix
|
|
{
|
||
|
|
description = "Pinned matrix package versions";
|
||
|
|
|
||
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||
|
|
|
||
|
|
outputs =
|
||
|
|
{ self, nixpkgs, ... }:
|
||
|
|
let
|
||
|
|
forAllSystems = nixpkgs.lib.genAttrs [
|
||
|
|
"x86_64-linux"
|
||
|
|
"aarch64-linux"
|
||
|
|
];
|
||
|
|
in
|
||
|
|
{
|
||
|
|
packages = forAllSystems (
|
||
|
|
system:
|
||
|
|
let
|
||
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
||
|
|
in
|
||
|
|
{
|
||
|
|
update = pkgs.writeShellApplication {
|
||
|
|
name = "update-pins";
|
||
|
|
runtimeInputs = [
|
||
|
|
pkgs.git
|
||
|
|
pkgs.nix
|
||
|
|
pkgs.jq
|
||
|
|
pkgs.coreutils
|
||
|
|
];
|
||
|
|
text = builtins.readFile ./update.sh;
|
||
|
|
};
|
||
|
|
}
|
||
|
|
);
|
||
|
|
|
||
|
|
apps = forAllSystems (system: {
|
||
|
|
update = {
|
||
|
|
type = "app";
|
||
|
|
program = "${self.packages.${system}.update}/bin/update-pins";
|
||
|
|
};
|
||
|
|
});
|
||
|
|
};
|
||
|
|
}
|