diff --git a/pkgs/default.nix b/pkgs/default.nix index 415aa00..ebde6f4 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -13,6 +13,10 @@ let buildGoModule = unstable.buildGo122Module; }; + morph = callPackage ./morph.nix { + buildGoModule = unstable.buildGo122Module; + }; + forgejo = callPackage ./forgejo { buildGoModule = unstable.buildGo122Module; }; diff --git a/pkgs/morph.nix b/pkgs/morph.nix new file mode 100644 index 0000000..80459a2 --- /dev/null +++ b/pkgs/morph.nix @@ -0,0 +1,33 @@ +{ buildGoModule +, fetchFromGitHub +}: + +buildGoModule rec { + pname = "mattermost-morph"; + version = "1.1.0"; + + src = fetchFromGitHub { + owner = "mattermost"; + repo = "morph"; + rev = "v${version}"; + hash = "sha256-Orh/a9OlUVIlDdLXRpDAnHUmWRiM1N2oO+dijbuJzx8="; + }; + + vendorHash = null; + + subPackages = [ "cmd/morph" ]; + + tags = [ "production" ]; + + ldflags = [ + "-s" + "-w" + "-X github.com/mattermost/mattermost/server/public/model.Version=${version}" + "-X github.com/mattermost/mattermost/server/public/model.BuildNumber=${version}-nixpkgs" + "-X github.com/mattermost/mattermost/server/public/model.BuildDate=1970-01-01" + "-X github.com/mattermost/mattermost/server/public/model.BuildHash=v${version}" + "-X github.com/mattermost/mattermost/server/public/model.BuildHashEnterprise=none" + "-X github.com/mattermost/mattermost/server/public/model.BuildEnterpriseReady=false" + ]; + +}