{ description = "A Nix Flake for a fork of cgit"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; }; outputs = { self, nixpkgs }: let forAllSystems = nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; in { packages = forAllSystems (system: let pkgs = nixpkgs.legacyPackages.${system}; in { default = pkgs.callPackage ({ lib, fetchurl, callPackage, luajit, nixosTests }: # This logic was previously in package.nix callPackage (import ./common.nix rec { pname = "cgit-fork"; version = "1.2.3"; src = ./.; # cgit needs the git source code to compile. # Ensure this matches the version found in the Makefile of your fork. gitSrc = fetchurl { url = "mirror://kernel/software/scm/git/git-2.25.1.tar.xz"; sha256 = "09lzwa183nblr6l8ib35g2xrjf9wm9yhk3szfvyzkwivdv69c9r2"; }; buildInputs = [ luajit ]; passthru.tests = { inherit (nixosTests) cgit; }; homepage = "https://git.zx2c4.com/cgit/about/"; description = "Web frontend for git repositories (Custom Fork)"; maintainers = with lib.maintainers; [ ]; }) { } ) { }; }); }; }