Unverified Commit fe516ada authored by TomaSajt's avatar TomaSajt
Browse files

gcs: format with nixfmt

parent 65d8de75
Loading
Loading
Loading
Loading
+46 −36
Original line number Diff line number Diff line
{ lib
, buildGoModule
, fetchFromGitHub
, pkg-config
, moreutils
, libGL
, libX11
, libXcursor
, libXrandr
, libXinerama
, libXi
, libXxf86vm
, mupdf
, fontconfig
, freetype
, stdenv
, darwin
, nix-update-script
{
  lib,
  buildGoModule,
  fetchFromGitHub,
  pkg-config,
  moreutils,
  libGL,
  libX11,
  libXcursor,
  libXrandr,
  libXinerama,
  libXi,
  libXxf86vm,
  mupdf,
  fontconfig,
  freetype,
  stdenv,
  darwin,
  nix-update-script,
}:

buildGoModule rec {
@@ -36,9 +37,13 @@ buildGoModule rec {

  vendorHash = "sha256-ee6qvwnUXtsBcovPOORfVpdndICtIUYe4GrP52V/P3k=";

  nativeBuildInputs = [ pkg-config moreutils ];
  nativeBuildInputs = [
    pkg-config
    moreutils
  ];

  buildInputs = [
  buildInputs =
    [
      libGL
      libX11
      libXcursor
@@ -49,7 +54,8 @@ buildGoModule rec {
      mupdf
      fontconfig
      freetype
  ] ++ lib.optionals stdenv.isDarwin [
    ]
    ++ lib.optionals stdenv.isDarwin [
      darwin.apple_sdk_11_0.frameworks.Carbon
      darwin.apple_sdk_11_0.frameworks.Cocoa
      darwin.apple_sdk_11_0.frameworks.Kernel
@@ -57,7 +63,11 @@ buildGoModule rec {

  # flags are based on https://github.com/richardwilkes/gcs/blob/master/build.sh
  flags = [ "-a" ];
  ldflags = [ "-s" "-w" "-X github.com/richardwilkes/toolbox/cmdline.AppVersion=${version}" ];
  ldflags = [
    "-s"
    "-w"
    "-X github.com/richardwilkes/toolbox/cmdline.AppVersion=${version}"
  ];

  installPhase = ''
    runHook preInstall