DEVELOPMENT ENVIRONMENT

~liljamo/makeimg.nix

279df7c459731030b5b94fd78a9f1c497f59e290 — Jonni Liljamo 9 days ago
feat: makeimg
4 files changed, 119 insertions(+), 0 deletions(-)

A .gitignore
A default.nix
A flake.lock
A flake.nix
A  => .gitignore +1 -0
@@ 1,1 @@
/result

A  => default.nix +40 -0
@@ 1,40 @@
{
  makeWrapper,
  lib,
  pkgs,
  stdenv,
  coreutils,
  util-linux,
  e2fsprogs,
  parted,
  apk-tools,
  findutils,
  ...
}: let
in
  stdenv.mkDerivation rec {
    pname = "makeimg";
    version = "0.14.0";

    src = pkgs.fetchFromSourcehut {
      owner = "~bitfehler";
      repo = "makeimg";
      tag = "v${version}";
      hash = "sha256-cLCLCG0+ShFazuVBG9GcvVmQNJtuMkKdGEP3QNJPTAo=";
    };

    dontBuild = true;

    nativeBuildInputs = [makeWrapper];
    installPhase = ''
      install -Dm755 -t $out/bin makeimg
      wrapProgram $out/bin/makeimg --set PATH ${lib.makeBinPath [
        coreutils
        util-linux
        e2fsprogs
        parted
        apk-tools
        findutils
      ]}
    '';
  }

A  => flake.lock +61 -0
@@ 1,61 @@
{
  "nodes": {
    "flake-parts": {
      "inputs": {
        "nixpkgs-lib": "nixpkgs-lib"
      },
      "locked": {
        "lastModified": 1763759067,
        "narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=",
        "owner": "hercules-ci",
        "repo": "flake-parts",
        "rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0",
        "type": "github"
      },
      "original": {
        "owner": "hercules-ci",
        "repo": "flake-parts",
        "type": "github"
      }
    },
    "nixpkgs": {
      "locked": {
        "lastModified": 1763934636,
        "narHash": "sha256-9glbI7f1uU+yzQCq5LwLgdZqx6svOhZWkd4JRY265fc=",
        "owner": "nixos",
        "repo": "nixpkgs",
        "rev": "ee09932cedcef15aaf476f9343d1dea2cb77e261",
        "type": "github"
      },
      "original": {
        "owner": "nixos",
        "ref": "nixpkgs-unstable",
        "repo": "nixpkgs",
        "type": "github"
      }
    },
    "nixpkgs-lib": {
      "locked": {
        "lastModified": 1761765539,
        "narHash": "sha256-b0yj6kfvO8ApcSE+QmA6mUfu8IYG6/uU28OFn4PaC8M=",
        "owner": "nix-community",
        "repo": "nixpkgs.lib",
        "rev": "719359f4562934ae99f5443f20aa06c2ffff91fc",
        "type": "github"
      },
      "original": {
        "owner": "nix-community",
        "repo": "nixpkgs.lib",
        "type": "github"
      }
    },
    "root": {
      "inputs": {
        "flake-parts": "flake-parts",
        "nixpkgs": "nixpkgs"
      }
    }
  },
  "root": "root",
  "version": 7
}

A  => flake.nix +17 -0
@@ 1,17 @@
{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
    flake-parts.url = "github:hercules-ci/flake-parts";
  };

  outputs = inputs @ {...}:
    inputs.flake-parts.lib.mkFlake {inherit inputs;} {
      systems = ["x86_64-linux"];
      perSystem = {
        pkgs,
        ...
      }: {
        packages.default = pkgs.callPackage ./default.nix {};
      };
    };
}