From 6a50f540270b150aa80afe2774bd9849c7b66d24 Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Tue, 8 Oct 2024 18:02:54 +0800 Subject: [PATCH 1/3] writefreely: 0.15.0 -> 0.15.1 --- .../applications/misc/writefreely/default.nix | 10 ++---- .../writefreely/fix-go-version-error.patch | 36 ------------------- 2 files changed, 3 insertions(+), 43 deletions(-) delete mode 100644 pkgs/applications/misc/writefreely/fix-go-version-error.patch diff --git a/pkgs/applications/misc/writefreely/default.nix b/pkgs/applications/misc/writefreely/default.nix index 0f8d3b6fac29..55d4431a6215 100644 --- a/pkgs/applications/misc/writefreely/default.nix +++ b/pkgs/applications/misc/writefreely/default.nix @@ -2,20 +2,16 @@ buildGoModule rec { pname = "writefreely"; - version = "0.15.0"; + version = "0.15.1"; src = fetchFromGitHub { owner = "writefreely"; repo = pname; rev = "v${version}"; - sha256 = "sha256-7KTNimthtfmQCgyXevAEj+CZ2MS+uOby73OO1fGNXfs="; + sha256 = "sha256-Qr31XSbAckLElD81yxD+K7tngWECQ+wyuESC+biAbyw="; }; - vendorHash = "sha256-6RTshhxX+w/gdK53wCHVMpm6EkkRtEJ2/Fe7MfZ0WvY="; - - patches = [ - ./fix-go-version-error.patch - ]; + vendorHash = "sha256-HmEh8WmKbdAimvzsAiaXcqSXoU1DJx06+s1EH1JZmwo="; ldflags = [ "-s" "-w" "-X github.com/writefreely/writefreely.softwareVer=${version}" ]; diff --git a/pkgs/applications/misc/writefreely/fix-go-version-error.patch b/pkgs/applications/misc/writefreely/fix-go-version-error.patch deleted file mode 100644 index bfe7ba2dd5dc..000000000000 --- a/pkgs/applications/misc/writefreely/fix-go-version-error.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/go.mod b/go.mod -index c49d701..601443d 100644 ---- a/go.mod -+++ b/go.mod -@@ -89,4 +89,6 @@ require ( - gopkg.in/yaml.v3 v3.0.1 // indirect - ) - --go 1.19 -+go 1.21 -+ -+toolchain go1.21.6 -diff --git a/go.sum b/go.sum -index a9256ea..28ad24f 100644 ---- a/go.sum -+++ b/go.sum -@@ -72,6 +72,7 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw - github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= - github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= - github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= -+github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= - github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e h1:JKmoR8x90Iww1ks85zJ1lfDGgIiMDuIptTOhJq+zKyg= - github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= - github.com/gorilla/csrf v1.7.2 h1:oTUjx0vyf2T+wkrx09Trsev1TE+/EbDAeHtSTbtC2eI= -@@ -106,9 +107,11 @@ github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVY - github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= - github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= - github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -+github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= - github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= - github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= - github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -+github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= - github.com/kylemcc/twitter-text-go v0.0.0-20180726194232-7f582f6736ec h1:ZXWuspqypleMuJy4bzYEqlMhJnGAYpLrWe5p7W3CdvI= - github.com/kylemcc/twitter-text-go v0.0.0-20180726194232-7f582f6736ec/go.mod h1:voECJzdraJmolzPBgL9Z7ANwXf4oMXaTCsIkdiPpR/g= - github.com/mailgun/mailgun-go v2.0.0+incompatible h1:0FoRHWwMUctnd8KIR3vtZbqdfjpIMxOZgcSa51s8F8o= From 852a489ac7c45f12f0caf477214ef9cd8ef6c0a4 Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Tue, 8 Oct 2024 18:04:56 +0800 Subject: [PATCH 2/3] writefreely: move to pkgs/by-name --- .../default.nix => by-name/wr/writefreely/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{applications/misc/writefreely/default.nix => by-name/wr/writefreely/package.nix} (100%) diff --git a/pkgs/applications/misc/writefreely/default.nix b/pkgs/by-name/wr/writefreely/package.nix similarity index 100% rename from pkgs/applications/misc/writefreely/default.nix rename to pkgs/by-name/wr/writefreely/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 787f20384e3c..3788e15cc606 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2906,8 +2906,6 @@ with pkgs; yaft = callPackage ../applications/terminal-emulators/yaft { }; - writefreely = callPackage ../applications/misc/writefreely { }; - iqueue = callPackage ../development/libraries/iqueue { }; lifecycled = callPackage ../tools/misc/lifecycled { }; From 85848e7d8bae32e63d13eb02abca687d12a10cf3 Mon Sep 17 00:00:00 2001 From: Cassie Cheung Date: Tue, 8 Oct 2024 18:13:04 +0800 Subject: [PATCH 3/3] writefreely: format with nixfmt --- pkgs/by-name/wr/writefreely/package.nix | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/wr/writefreely/package.nix b/pkgs/by-name/wr/writefreely/package.nix index 55d4431a6215..f952481f828d 100644 --- a/pkgs/by-name/wr/writefreely/package.nix +++ b/pkgs/by-name/wr/writefreely/package.nix @@ -1,4 +1,9 @@ -{ lib, buildGoModule, fetchFromGitHub, nixosTests }: +{ + lib, + buildGoModule, + fetchFromGitHub, + nixosTests, +}: buildGoModule rec { pname = "writefreely"; @@ -13,13 +18,19 @@ buildGoModule rec { vendorHash = "sha256-HmEh8WmKbdAimvzsAiaXcqSXoU1DJx06+s1EH1JZmwo="; - ldflags = [ "-s" "-w" "-X github.com/writefreely/writefreely.softwareVer=${version}" ]; + ldflags = [ + "-s" + "-w" + "-X github.com/writefreely/writefreely.softwareVer=${version}" + ]; tags = [ "sqlite" ]; subPackages = [ "cmd/writefreely" ]; - passthru.tests = { inherit (nixosTests) writefreely; }; + passthru.tests = { + inherit (nixosTests) writefreely; + }; meta = with lib; { description = "Build a digital writing community";