diff options
Diffstat (limited to 'nixpkgs/pkgs/servers/alps/default.nix')
-rw-r--r-- | nixpkgs/pkgs/servers/alps/default.nix | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/alps/default.nix b/nixpkgs/pkgs/servers/alps/default.nix new file mode 100644 index 000000000000..70659f0c3c5e --- /dev/null +++ b/nixpkgs/pkgs/servers/alps/default.nix @@ -0,0 +1,51 @@ +{ lib, buildGoModule, fetchFromSourcehut, fetchpatch, nixosTests }: + +buildGoModule rec { + pname = "alps"; + version = "2022-10-18"; + + src = fetchFromSourcehut { + owner = "~migadu"; + repo = "alps"; + rev = "f01fbcbc48db5e65d69a0ebd9d7cb0deb378cf13"; + hash = "sha256-RSug3YSiqYLGs05Bee4NoaoCyPvUZ7IqlKWI1hmxbiA="; + }; + + vendorHash = "sha256-XDm6LU9D/rVQHiko7EFpocv+IktGe6tQhJYRrOJxeSs="; + + ldflags = [ + "-s" + "-w" + "-X main.themesPath=${placeholder "out"}/share/alps/themes" + "-X git.sr.ht/~migadu/alps.PluginDir=${placeholder "out"}/share/alps/plugins" + ]; + + patches = [ + (fetchpatch { + name = "Issue-160-Alps-theme-has-a-enormous-move-to-list-sel"; + url = "https://lists.sr.ht/~migadu/alps-devel/patches/30096/mbox"; + hash = "sha256-Sz/SCkrrXZWrmJzjfPXi+UfCcbwsy6QiA7m34iiEFX0="; + }) + ]; + + postPatch = '' + substituteInPlace plugin.go --replace "const PluginDir" "var PluginDir" + ''; + + postInstall = '' + mkdir -p "$out/share/alps" + cp -r themes plugins "$out/share/alps/" + ''; + + proxyVendor = true; + + passthru.tests = { inherit(nixosTests) alps; }; + + meta = with lib; { + description = "A simple and extensible webmail."; + homepage = "https://git.sr.ht/~migadu/alps"; + license = licenses.mit; + maintainers = with maintainers; [ booklearner madonius hmenke ]; + mainProgram = "alps"; + }; +} |