14 # Note: this module is actually the source code of crypto/x509
15 # taken from the Go stdlib and patcheed. So, it can't simply
16 # be pinned and added to the vendor dir as everything else.
17 x509 = stdenv.mkDerivation rec {
18 pname = "x509-compressed";
21 src = fetchFromGitHub {
23 repo = "x509-compressed";
25 hash = "sha256-BmVtClZ3TsUbQrhwREXa42pUOlkBA4a2HVBzl1sdBIo=";
29 # https://github.com/namecoin/x509-compressed/pull/4
31 url = "https://github.com/namecoin/x509-compressed/commit/b4fb598b.patch";
32 hash = "sha256-S4Y4B4FH15IyaTJtSb03C8QffnsMXSYc6q1Gka/PVV4=";
36 nativeBuildInputs = [ go ];
39 # Put in our own lockfiles
40 cp ${./x509-go.mod} go.mod
41 cp ${./x509-go.sum} go.sum
44 env HOME=/tmp go generate ./...
46 # Clean up more references to internal modules
47 # (see https://github.com/namecoin/x509-compressed/pull/4)
48 sed -e '/import "internal/d' \
49 -e 's/goos.IsAndroid/0/g' -i x509/*.go
61 version = "unstable-2024-05-18";
63 src = fetchFromGitHub {
66 rev = "8a9f7c3037384f12fae400268d0a7f79d26b5532";
67 hash = "sha256-lFpjfpOAgvYoV3ci2oSdy8ZOlQ2rWlApiFWcvOMdkyk=";
70 # Note: to update ncdns add the following lines
77 # to the `preBuild` here and update the lock files
79 # Sideload the generated x509 module
83 vendorHash = "sha256-FoCK2qkhbc+6D4V77pNLiC9d68nkeYJxb7uiNYEP2Xw=";
85 buildInputs = [ libcap ];
87 patches = [ ./fix-tpl-path.patch ];
89 # Put in our own lockfiles
91 cp ${./ncdns-go.mod} go.mod
92 cp ${./ncdns-go.sum} go.sum
96 # needed to run the ncdns test suite
97 ln -s $PWD/vendor ../go/src
101 mkdir -p "$out/share"
102 cp -r _doc "$out/share/doc"
103 cp -r _tpl "$out/share/tpl"
106 passthru.tests.ncdns = nixosTests.ncdns;
109 description = "Namecoin to DNS bridge daemon";
110 homepage = "https://github.com/namecoin/ncdns";
111 license = licenses.gpl3Plus;
112 maintainers = with maintainers; [ rnhmjoj ];