From 1931a9e00426daf9211bdfa1f195d2c91f8666eb Mon Sep 17 00:00:00 2001 From: sumire Date: Tue, 2 Apr 2024 19:28:22 +0800 Subject: [PATCH 1/3] chore(gitignore): ignore result* --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fcfc4a1 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +result* From 5f33e5e72d6059a0a62c1d23b86c8af61859aa7d Mon Sep 17 00:00:00 2001 From: sumire Date: Tue, 2 Apr 2024 19:32:14 +0800 Subject: [PATCH 2/3] ci: add justfile --- justfile | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 justfile diff --git a/justfile b/justfile new file mode 100644 index 0000000..160a966 --- /dev/null +++ b/justfile @@ -0,0 +1,39 @@ +# justfile +# cheatsheet: https://cheatography.com/linux-china/cheat-sheets/justfile/ + +# define alias + +# set options +set positional-arguments := true + +# default recipe to display help information +default: + @just --list + +# build pkg +build pkg: + @nix build .#{{ pkg }} + +# check version +version pkg: + @./result/bin/{{ pkg }} --version + +# update all flake inputs +update: + @nix flake update + +# update a particular flake input +update-input input: + @nix flake lock --update-input {{ input }} + +# nix-prefetch-url +prefetch-url url: + @nix-prefetch-url --type sha256 '{{ url }}' | xargs nix hash to-sri --type sha256 + +# nix-prefetch-git +prefetch-git repo rev: + @nix-prefetch-git --url 'git@github.com:{{ repo }}' --rev '{{ rev }}' --fetch-submodules --quiet + +# stage all files +add: + @git add . From 55a852e2a2432341d1c927e345cc6c13a053f22c Mon Sep 17 00:00:00 2001 From: sumire Date: Tue, 2 Apr 2024 19:35:19 +0800 Subject: [PATCH 3/3] chore(dae): sync upstream release (v0.6.0rc1) --- dae/metadata.json | 6 ++++++ dae/package.nix | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 dae/metadata.json diff --git a/dae/metadata.json b/dae/metadata.json new file mode 100644 index 0000000..b715859 --- /dev/null +++ b/dae/metadata.json @@ -0,0 +1,6 @@ +{ + "version": "v0.6.0rc1", + "rev": "v0.6.0rc1", + "hash": "sha256-A8ecYE0p+FoW0yskprvvy73pup/eR4bx8HNa55OorwY=", + "vendorHash": "sha256-NzPPf/KwuRCMmOGwk9k3ndYojDF9B/hXBPQ8ySan3t8=" +} diff --git a/dae/package.nix b/dae/package.nix index fa4a107..3654202 100644 --- a/dae/package.nix +++ b/dae/package.nix @@ -3,20 +3,20 @@ , fetchFromGitHub , buildGoModule }: +let + metadata = builtins.fromJSON (builtins.readFile ./metadata.json); +in buildGoModule rec { pname = "dae"; - version = "unstable-2023-09-04"; + inherit (metadata) version vendorHash; src = fetchFromGitHub { owner = "daeuniverse"; repo = pname; - rev = "8334868905096abc4a2e94d39f831f6bae8e86d3"; - hash = "sha256-aOL0rwjRES0V3PFmBiHJcNiyOcGKGNY78Wqgnbk2cG0="; + inherit (metadata) rev hash; fetchSubmodules = true; }; - vendorHash = "sha256-rZwK+mYWJqgLFhzwZTfCC4tIg2gtNtx7Lu/fyOL3ozA="; - proxyVendor = true; nativeBuildInputs = [ clang ];