inputs: provide updateScripts
This commit is contained in:
parent
ec12c3eee4
commit
476cf36b57
1 changed files with 69 additions and 14 deletions
83
inputs.nix
83
inputs.nix
|
@ -1,29 +1,84 @@
|
|||
let self = {
|
||||
lock ? import ./lock.nix
|
||||
, lib ? import "${(self {}).nixpkgs}/lib"
|
||||
lock ? import lockFile,
|
||||
lockFile ? ./lock.nix,
|
||||
pkgs ? throw "inputs called without pkgs",
|
||||
}:
|
||||
|
||||
{
|
||||
inherit lock;
|
||||
nixos-vscode-server = builtins.fetchTarball {
|
||||
name = "nixos-vscode-server";
|
||||
nixos-vscode-server = rec {
|
||||
url = "https://github.com/nix-community/nixos-vscode-server/archive/${lock.nixos-vscode-server.revision}.tar.gz";
|
||||
sha256 = "${lock.nixos-vscode-server.sha256}";
|
||||
updateScript = pkgs.den-http-get-updater {
|
||||
fileLocation = lockFile;
|
||||
previousHash = lock.nixos-vscode-server.sha256;
|
||||
previousVersion = lock.nixos-vscode-server.revision;
|
||||
versionUrl = "https://api.github.com/repos/nix-community/nixos-vscode-server/commits";
|
||||
contentParser = "jq -rc '.[0].sha' <<< \"$newVersion\"";
|
||||
prefetchUrlLocation = {
|
||||
file = ./inputs.nix;
|
||||
attrpath = "nixos-vscode-server.url";
|
||||
};
|
||||
};
|
||||
outPath = builtins.fetchTarball {
|
||||
inherit url;
|
||||
name = "nixos-vscode-server";
|
||||
sha256 = "${lock.nixos-vscode-server.sha256}";
|
||||
};
|
||||
};
|
||||
nixpkgs = builtins.fetchTarball {
|
||||
name = "nixpkgs";
|
||||
nixpkgs = rec {
|
||||
url = "https://github.com/NixOS/nixpkgs/archive/${lock.nixpkgs.revision}.tar.gz";
|
||||
sha256 = "${lock.nixpkgs.sha256}";
|
||||
updateScript = pkgs.den-http-get-updater {
|
||||
fileLocation = lockFile;
|
||||
previousHash = lock.nixpkgs.sha256;
|
||||
previousVersion = lock.nixpkgs.revision;
|
||||
versionUrl = "https://channels.nixos.org/nixos-24.11/git-revision";
|
||||
prefetchUrlLocation = {
|
||||
file = ./inputs.nix;
|
||||
attrpath = "nixpkgs.url";
|
||||
};
|
||||
};
|
||||
outPath = builtins.fetchTarball {
|
||||
inherit url;
|
||||
name = "nixpkgs";
|
||||
sha256 = "${lock.nixpkgs.sha256}";
|
||||
};
|
||||
};
|
||||
nixpkgs-unstable = builtins.fetchTarball {
|
||||
name = "nixpkgs-unstable";
|
||||
nixpkgs-unstable = rec {
|
||||
url = "https://github.com/NixOS/nixpkgs/archive/${lock.nixpkgs-unstable.revision}.tar.gz";
|
||||
sha256 = "${lock.nixpkgs-unstable.sha256}";
|
||||
updateScript = pkgs.den-http-get-updater {
|
||||
fileLocation = lockFile;
|
||||
previousHash = lock.nixpkgs-unstable.sha256;
|
||||
previousVersion = lock.nixpkgs-unstable.revision;
|
||||
versionUrl = "https://channels.nixos.org/nixos-unstable/git-revision";
|
||||
prefetchUrlLocation = {
|
||||
file = ./inputs.nix;
|
||||
attrpath = "nixpkgs-unstable.url";
|
||||
};
|
||||
};
|
||||
outPath = builtins.fetchTarball {
|
||||
inherit url;
|
||||
name = "nixpkgs-unstable";
|
||||
sha256 = "${lock.nixpkgs-unstable.sha256}";
|
||||
};
|
||||
};
|
||||
cosmic-modules = builtins.fetchTarball {
|
||||
name = "cosmic-modules";
|
||||
cosmic-modules = rec {
|
||||
url = "https://github.com/lilyinstarlight/nixos-cosmic/archive/${lock.cosmic-modules.revision}.tar.gz";
|
||||
sha256 = "${lock.cosmic-modules.sha256}";
|
||||
updateScript = pkgs.den-http-get-updater {
|
||||
fileLocation = lockFile;
|
||||
previousHash = lock.cosmic-modules.sha256;
|
||||
previousVersion = lock.cosmic-modules.revision;
|
||||
versionUrl = "https://api.github.com/repos/lilyinstarlight/nixos-cosmic/commits";
|
||||
contentParser = "jq -rc '.[0].sha' <<< \"$newVersion\"";
|
||||
prefetchUrlLocation = {
|
||||
file = ./inputs.nix;
|
||||
attrpath = "cosmic-modules.url";
|
||||
};
|
||||
};
|
||||
outPath = builtins.fetchTarball {
|
||||
inherit url;
|
||||
name = "cosmic-modules";
|
||||
sha256 = "${lock.cosmic-modules.sha256}";
|
||||
};
|
||||
};
|
||||
};
|
||||
in self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue