did @main -
refs -
log -
-
https://git.jolheiser.com/did.git
resolve did->handle or handle->did
nix
Signed-off-by: jolheiser <git@jolheiser.com>
Signature
-----BEGIN SSH SIGNATURE-----
U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAgBTEvCQk6VqUAdN2RuH6bj1dNkY
oOpbPWj+jw4ua1B1cAAAADZ2l0AAAAAAAAAAZzaGE1MTIAAABTAAAAC3NzaC1lZDI1NTE5
AAAAQJwyYsJ6DgMH0bR8Vs3XZLB8bpTylrZVhPwvfVXB8j5fLATWMut57MGiLBMmGiC1eG
3No+W9zmjt8nNViF6tkws=
-----END SSH SIGNATURE-----
4 changed files, 86 additions(+), 0 deletions(-)
diff --git a/flake.lock b/flake.lock
new file mode 100644
index 0000000000000000000000000000000000000000..5e10b4614fb1f5613c4d4fb3ab3f828bf75dc51e
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,27 @@
+{
+ "nodes": {
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1741310760,
+ "narHash": "sha256-aizILFrPgq/W53Jw8i0a1h1GZAAKtlYOrG/A5r46gVM=",
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "rev": "de0fe301211c267807afd11b12613f5511ff7433",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nixos",
+ "ref": "nixpkgs-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "root": {
+ "inputs": {
+ "nixpkgs": "nixpkgs"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000000000000000000000000000000000000..ae3040f005963d7a4260f0a1a531b17a6764dbbe
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,20 @@
+{
+ description = "did->handle or handle->did";
+ inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
+ outputs =
+ { nixpkgs, ... }:
+ let
+ systems = [
+ "x86_64-linux"
+ "i686-linux"
+ "x86_64-darwin"
+ "aarch64-linux"
+ "armv6l-linux"
+ "armv7l-linux"
+ ];
+ forAllSystems = f: nixpkgs.lib.genAttrs systems f;
+ in
+ {
+ packages = forAllSystems (system: import ./nix { pkgs = import nixpkgs { inherit system; }; });
+ };
+}
diff --git a/nix/default.nix b/nix/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..49bf9cd2b475f6220c8e7202b6b7c198dcf881bb
--- /dev/null
+++ b/nix/default.nix
@@ -0,0 +1,10 @@
+{
+ pkgs ? import <nixpkgs>,
+}:
+let
+ pkg = pkgs.callPackage ./pkg.nix { inherit pkgs; };
+in
+{
+ did = pkg;
+ default = pkg;
+}
diff --git a/nix/pkg.nix b/nix/pkg.nix
new file mode 100644
index 0000000000000000000000000000000000000000..419be8718a17bedb134a7fb33d89c487806632da
--- /dev/null
+++ b/nix/pkg.nix
@@ -0,0 +1,29 @@
+{
+ pkgs ? import <nixpkgs>,
+}:
+let
+ name = "did";
+in
+pkgs.buildGoModule {
+ pname = name;
+ version = "main";
+ src = pkgs.nix-gitignore.gitignoreSource [ ] (
+ builtins.path {
+ inherit name;
+ path = ../.;
+ }
+ );
+ vendorHash = null;
+ env.CGO_ENABLED = 0;
+ flags = [ "-trimpath" ];
+ ldflags = [
+ "-s"
+ "-w"
+ "-extldflags -static"
+ ];
+ meta = {
+ description = "handle->did and did->handle";
+ homepage = "https://git.jolheiser.com/did";
+ mainProgram = "did";
+ };
+}