Add a dev shell for developing archiso images

This commit is contained in:
Manuel Thalmann 2024-06-18 20:59:59 +02:00
parent 930cfc377e
commit b1740cbbe8
3 changed files with 126 additions and 0 deletions

62
flake.lock Normal file
View file

@ -0,0 +1,62 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"ref": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1718727192,
"narHash": "sha256-vAs8n73hLDTglE6Bm0aAgGfCl3Y7rSCBhCe2vr3asW0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "6263d23ea4e04f86272325b113bee8133c09d50a",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "6263d23ea4e04f86272325b113bee8133c09d50a",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

35
flake.nix Normal file
View file

@ -0,0 +1,35 @@
{
description = "Setup Scripts for Personal Environment on Various Operating Systems";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=6263d23ea4e04f86272325b113bee8133c09d50a";
flake-utils.url = "github:numtide/flake-utils?ref=b1d9ab70662946ef0850d488da1c9019f3a9752a";
};
outputs = { self, flake-utils, nixpkgs }: flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [
(
final: prev: {
archiso = prev.callPackage (import ./lib/packages/archiso.nix) { };
})
];
};
in {
devShells = {
archiso = pkgs.mkShell {
packages = [
pkgs.archiso
];
};
};
packages = {
archiso = pkgs.archiso;
};
});
}

29
lib/packages/archiso.nix Normal file
View file

@ -0,0 +1,29 @@
{ pkgs, fetchFromGitLab, ... }: pkgs.stdenv.mkDerivation (
rec {
pname = "archiso";
version = "78";
src = fetchFromGitLab {
domain = "gitlab.archlinux.org";
owner = "archlinux";
repo = pname;
rev = "v${version}";
sha256 = "u1dZ33IPgzA1ftNMuuMwNRSeifxEgeW8WObFwrUpZgQ=";
};
preInstall = "export PREFIX=$out";
nativeBuildInputs = with pkgs; [
docutils
git
];
propagatedBuildInputs = with pkgs; [
arch-install-scripts
dosfstools
libisoburn
mtools
pacman
squashfsTools
];
})