Unverified Commit e3986c2b authored by Matthieu Coudron's avatar Matthieu Coudron Committed by GitHub
Browse files

Merge pull request #328284 from isabelroses/mangal

mangal: fix build; modernize
parents 14c7bfa4 49870150
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -141,3 +141,6 @@ acd0e3898feb321cb9a71a0fd376f1157d0f4553

# poptracker: format with nixfmt-rfc-style (#326697)
ff5c8f6cc3d1f2e017e86d50965c14b71f00567b

# mangal: format with nixfmt-rfc-style #328284
3bb5e993cac3a6e1c3056d2bc9bf43eb2c7a5951
+13 −6
Original line number Diff line number Diff line
{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:

{
  lib,
  stdenv,
  buildGoModule,
  fetchFromGitHub,
  installShellFiles,
}:
buildGoModule rec {
  pname = "mangal";
  version = "4.0.6";
@@ -14,13 +19,16 @@ buildGoModule rec {
  proxyVendor = true;
  vendorHash = null;

  ldflags = [ "-s" "-w" ];
  ldflags = [
    "-s"
    "-w"
  ];

  nativeBuildInputs = [ installShellFiles ];

  postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
    # Mangal creates a config file in the folder ~/.config/mangal and fails if not possible
    export MANGAL_CONFIG_PATH=`mktemp -d`
    export HOME=$(mktemp -d)
    installShellCompletion --cmd mangal \
      --bash <($out/bin/mangal completion bash) \
      --zsh <($out/bin/mangal completion zsh) \
@@ -30,8 +38,7 @@ buildGoModule rec {
  doCheck = false; # test fail because of sandbox

  meta = with lib; {
    description =
      "A fancy CLI app written in Go which scrapes, downloads and packs manga into different formats";
    description = "CLI app written in Go which scrapes, downloads and packs manga into different formats";
    homepage = "https://github.com/metafates/mangal";
    license = licenses.mit;
    maintainers = [ maintainers.bertof ];
+0 −2
Original line number Diff line number Diff line
@@ -1001,8 +1001,6 @@ with pkgs;
  graph-easy = callPackage ../tools/graphics/graph-easy { };
  mangal = callPackage ../applications/misc/mangal { };
  mermaid-filter = callPackage ../tools/misc/mermaid-filter { };
  graphw00f = callPackage ../tools/security/graphw00f { };