nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 65 lines 1.7 kB view raw
1{ 2 lib, 3 buildGoModule, 4 fetchurl, 5 sqlite, 6 installShellFiles, 7 nixosTests, 8}: 9buildGoModule (finalAttrs: { 10 pname = "honk"; 11 version = "1.5.2"; 12 13 src = fetchurl { 14 url = "https://humungus.tedunangst.com/r/honk/d/honk-${finalAttrs.version}.tgz"; 15 hash = "sha256-7dIui+VMHn916yMdhqN6Pk2P/s0vvXzVKFsTZ5wp12A="; 16 }; 17 vendorHash = null; 18 19 buildInputs = [ 20 sqlite 21 ]; 22 23 nativeBuildInputs = [ 24 installShellFiles 25 ]; 26 27 subPackages = [ "." ]; 28 29 # This susbtitution is not mandatory. It is only existing to have something 30 # working out of the box. This value can be overridden by the user, by 31 # providing the `-viewdir` parameter in the command line. 32 postPatch = '' 33 substituteInPlace main.go --replace-fail \ 34 "var viewDir = \".\"" \ 35 "var viewDir = \"$out/share/honk\"" 36 ''; 37 38 postInstall = '' 39 mkdir -p $out/share/honk 40 mkdir -p $out/share/doc/honk 41 42 mv docs/{,honk-}intro.1 43 mv docs/{,honk-}hfcs.1 44 mv docs/{,honk-}vim.3 45 mv docs/{,honk-}activitypub.7 46 47 installManPage docs/honk.1 docs/honk.3 docs/honk.5 docs/honk.8 \ 48 docs/honk-intro.1 docs/honk-hfcs.1 docs/honk-vim.3 docs/honk-activitypub.7 49 mv docs/{*.html,*.txt,*.jpg,*.png} $out/share/doc/honk 50 mv views $out/share/honk 51 ''; 52 53 passthru.tests = { 54 inherit (nixosTests) honk; 55 }; 56 57 meta = { 58 changelog = "https://humungus.tedunangst.com/r/honk/v/v${finalAttrs.version}/f/docs/changelog.txt"; 59 description = "ActivityPub server with minimal setup and support costs"; 60 homepage = "https://humungus.tedunangst.com/r/honk"; 61 license = lib.licenses.isc; 62 mainProgram = "honk"; 63 maintainers = with lib.maintainers; [ huyngo ]; 64 }; 65})