Unverified Commit 3f7520c0 authored by Paul Meyer's avatar Paul Meyer Committed by GitHub
Browse files

snicat: 0.0.1 -> 0.0.1-unstable-2024-09-05 (#339818)

parents e6725cad 81fc1c28
Loading
Loading
Loading
Loading
+12 −16
Original line number Diff line number Diff line
{ lib
, buildGoModule
, fetchFromGitHub
, fetchpatch
{
  lib,
  buildGoModule,
  fetchFromGitHub,
}:

buildGoModule rec {
  pname = "snicat";
  version = "0.0.1";
  version = "0.0.1-unstable-2024-09-05";

  src = fetchFromGitHub {
    owner = "CTFd";
    repo = "snicat";
    rev = version;
    hash = "sha256-fFlTBOz127le2Y7F9KKhbcldcyFEpAU5QiJ4VCAPs9Y=";
    rev = "8c8f06e59d5aedb9a97115a4e0eafa75b17a6cdf";
    hash = "sha256-71wVth+VzEnGW8ErWmj6XjhNtVpx/q8lViIA71njwqU=";
  };

  patches = [
    # Migrate to Go modules
    (fetchpatch {
      url = "https://github.com/CTFd/snicat/commit/098a5ce3141bae5d2e188338d78517d710d10f70.patch";
      hash = "sha256-pIdXViUz14nkvL1H3u3oFkm308XA2POtKIGZOKDO6p8=";
    })
  ];

  vendorHash = "sha256-27ykI9HK1jFanxwa6QrN6ZS548JbFNSZHaXr4ciCVOE=";
  proxyVendor = true;

  ldflags = [ "-s" "-X main.version=v${version}" ];
  ldflags = [
    "-s"
    "-X main.version=v${version}"
  ];

  postInstall = ''
    mv $out/bin/snicat $out/bin/sc