From 9df7efa41c40faca201d359f9320111db473f597 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Tue, 18 Jul 2023 15:58:41 +0100 Subject: [PATCH 1/2] add asar --- compiler/asar/default.nix | 19 +++++++++++++++++++ compiler/asar/source.json | 11 +++++++++++ default.nix | 1 + flake.nix | 1 + overlay.nix | 1 + 5 files changed, 33 insertions(+) create mode 100644 compiler/asar/default.nix create mode 100644 compiler/asar/source.json diff --git a/compiler/asar/default.nix b/compiler/asar/default.nix new file mode 100644 index 0000000..4ebe654 --- /dev/null +++ b/compiler/asar/default.nix @@ -0,0 +1,19 @@ +{ + fetchFromGitHub, + cmake, + ninja, + stdenv, +}: let + source = builtins.fromJSON (builtins.readFile ./source.json); +in + stdenv.mkDerivation { + pname = "asar"; + version = source.date; + src = fetchFromGitHub { + owner = "RPGHacker"; + repo = "asar"; + inherit (source) rev sha256; + }; + nativeBuildInputs = [cmake ninja]; + cmakeDir = "../src"; + } diff --git a/compiler/asar/source.json b/compiler/asar/source.json new file mode 100644 index 0000000..2aaef6d --- /dev/null +++ b/compiler/asar/source.json @@ -0,0 +1,11 @@ +{ + "url": "https://github.com/RPGHacker/asar", + "rev": "d39723aa3bd071f685e670914ec7b4e47a7e0455", + "date": "2023-07-16T03:47:38+03:00", + "path": "/nix/store/azqqw9j7wjxk2bgpd9nl14n0s2cy6pxf-asar", + "sha256": "1gawm1akq1q40mbmlpcrq3krz563ckp5c1bi2v7l3cq2mk24l3zc", + "fetchLFS": false, + "fetchSubmodules": false, + "deepClone": false, + "leaveDotGit": false +} diff --git a/default.nix b/default.nix index 10d4491..a9b1159 100644 --- a/default.nix +++ b/default.nix @@ -75,6 +75,7 @@ in fcitx5 plover-plugin-python-dictionary plover-plugin-stenotype-extended + asar ; } // ( diff --git a/flake.nix b/flake.nix index c8d5eae..0186a80 100644 --- a/flake.nix +++ b/flake.nix @@ -119,6 +119,7 @@ fcitx5 plover-plugin-python-dictionary plover-plugin-stenotype-extended + asar ; } // ( diff --git a/overlay.nix b/overlay.nix index a40c70c..33e6cd0 100644 --- a/overlay.nix +++ b/overlay.nix @@ -127,6 +127,7 @@ system: self: super: let }); linux-bcachefs = self.callPackage ./linux/bcachefs {kernelPatches = [];}; bcachefs-tools = self.callPackage ./linux/bcachefs-tools {}; + asar = self.callPackage ./compiler/asar {}; }) riscv-overlay ]; -- 2.47.0 From fe2768b023cefa0854701f19c239e460063973f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Tue, 18 Jul 2023 16:00:32 +0100 Subject: [PATCH 2/2] add update script to asar --- compiler/asar/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/asar/default.nix b/compiler/asar/default.nix index 4ebe654..84b1089 100644 --- a/compiler/asar/default.nix +++ b/compiler/asar/default.nix @@ -16,4 +16,5 @@ in }; nativeBuildInputs = [cmake ninja]; cmakeDir = "../src"; + passthru.updateScript = [../../scripts/update-git.sh "https://github.com/RPGHacker/asar" "compiler/asar/source.json"]; } -- 2.47.0