From 173f66882d20842c64584055f7a55ae1863a5919 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Sat, 16 Nov 2024 21:55:15 +0100 Subject: [PATCH] Bump deps and nix toolchain to dart 3 --- bin/{ja_db.dart => jadb.dart} | 0 flake.lock | 66 +++-------------------- flake.nix | 20 ++----- nix/database_tool.nix | 28 +++------- pub2nix.lock | 99 ----------------------------------- pubspec.lock | 80 +++++++++++++++++----------- pubspec.yaml | 16 +++--- 7 files changed, 74 insertions(+), 235 deletions(-) rename bin/{ja_db.dart => jadb.dart} (100%) delete mode 100644 pub2nix.lock diff --git a/bin/ja_db.dart b/bin/jadb.dart similarity index 100% rename from bin/ja_db.dart rename to bin/jadb.dart diff --git a/flake.lock b/flake.lock index e0ec42a..6deb1eb 100644 --- a/flake.lock +++ b/flake.lock @@ -1,24 +1,9 @@ { "nodes": { - "flake-utils": { - "locked": { - "lastModified": 1649676176, - "narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "jmdict-src": { "flake": false, "locked": { - "narHash": "sha256-997+CJDljSggj2Kh9+1Xd+yvLJUkleQ7b5iuYIEwswc=", + "narHash": "sha256-iZ+KjmPiYTOrQGOgjeyhCLipZHkDL71f5QjUYKEQuD0=", "type": "file", "url": "http://ftp.edrdg.org/pub/Nihongo/JMdict.gz" }, @@ -30,7 +15,7 @@ "jmdict-with-examples-src": { "flake": false, "locked": { - "narHash": "sha256-6GU10LW5XO76ptXC+DNBRusuFI1E1i8Sda63sTXCsFU=", + "narHash": "sha256-ETm4X6FExaqQF0pJLnkODS9oHS1QAT+QpMFryJjZ5x8=", "type": "file", "url": "http://ftp.edrdg.org/pub/Nihongo/JMdict_e_examp.gz" }, @@ -51,59 +36,21 @@ "url": "http://nihongo.monash.edu/kanjidic2/kanjidic2.xml.gz" } }, - "nix-dart": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": [ - "nixpkgs" - ], - "pub2nix": "pub2nix" - }, - "locked": { - "lastModified": 1652213615, - "narHash": "sha256-+eehm2JlhoKgY+Ea4DTxDMei/x4Fgz7S+ZPqWpZysuI=", - "owner": "tadfisher", - "repo": "nix-dart", - "rev": "6f686ddf984306d944e9b5adf9f35f3a0a0a70b7", - "type": "github" - }, - "original": { - "owner": "tadfisher", - "repo": "nix-dart", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1731386116, - "narHash": "sha256-lKA770aUmjPHdTaJWnP3yQ9OI1TigenUqVC3wweqZuI=", + "lastModified": 1731676054, + "narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "689fed12a013f56d4c4d3f612489634267d86529", + "rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-24.05", + "ref": "nixos-unstable", "type": "indirect" } }, - "pub2nix": { - "flake": false, - "locked": { - "lastModified": 1594192744, - "narHash": "sha256-pDvcXSG1Mh2BpwkqAcNDJzcupV3pIAAtZJLfkiHMAz4=", - "owner": "paulyoung", - "repo": "pub2nix", - "rev": "0c7ecca590fcd1616db8c6468f799ffef36c85e9", - "type": "github" - }, - "original": { - "owner": "paulyoung", - "repo": "pub2nix", - "type": "github" - } - }, "radkfile-src": { "flake": false, "locked": { @@ -121,7 +68,6 @@ "jmdict-src": "jmdict-src", "jmdict-with-examples-src": "jmdict-with-examples-src", "kanjidic2-src": "kanjidic2-src", - "nix-dart": "nix-dart", "nixpkgs": "nixpkgs", "radkfile-src": "radkfile-src" } diff --git a/flake.nix b/flake.nix index ab237a5..9f7d747 100644 --- a/flake.nix +++ b/flake.nix @@ -2,12 +2,7 @@ description = "A SQLite database containing open source japanese language translation data"; inputs = { - nixpkgs.url = "nixpkgs/nixos-24.05"; - - nix-dart = { - url = "github:tadfisher/nix-dart"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + nixpkgs.url = "nixpkgs/nixos-unstable"; jmdict-src = { url = "http://ftp.edrdg.org/pub/Nihongo/JMdict.gz"; @@ -34,7 +29,6 @@ outputs = { self, nixpkgs, - nix-dart, jmdict-src, jmdict-with-examples-src, radkfile-src, @@ -49,14 +43,7 @@ "armv7l-linux" ]; - forAllSystems = f: lib.genAttrs systems (system: let - pkgs = import nixpkgs { - inherit system; - overlays = [ - nix-dart.overlay - ]; - }; - in f system pkgs); + forAllSystems = f: lib.genAttrs systems (system: f system nixpkgs.legacyPackages.${system}); in { apps = forAllSystems (system: pkgs: { default = let @@ -72,7 +59,6 @@ devShells = forAllSystems (system: pkgs: { default = pkgs.mkShell { buildInputs = with pkgs; [ - nix-dart.packages.${system}.pub2nix-lock dart gnumake sqlite-interactive @@ -113,7 +99,7 @@ }; database-tool = pkgs.callPackage ./nix/database_tool.nix { - inherit nix-dart src; + inherit src; }; database = pkgs.callPackage ./nix/database.nix { diff --git a/nix/database_tool.nix b/nix/database_tool.nix index 55d8ab9..3b9bcfd 100644 --- a/nix/database_tool.nix +++ b/nix/database_tool.nix @@ -1,27 +1,13 @@ { - nix-dart, - system, src, + buildDartApplication, }: -let - buildDartPackage = nix-dart.builders.${system}.buildDartPackage.override { - dart = nix-dart.packages.${system}.dart-dev; - }; -in (buildDartPackage { - pname = "database_tool"; - version = "1.0"; - +buildDartApplication { + pname = "jadb-database-tool"; + version = "1.0.0"; inherit src; - preBuild = '' - dart --version - ''; + autoPubspecLock = ../pubspec.lock; - specFile = ../pubspec.yaml; - lockFile = ../pub2nix.lock; - - meta.mainProgram = "ja_db"; -}).overrideAttrs(old: { - buildInputs = [nix-dart.packages.${system}.dart-dev]; - buildPhase = builtins.replaceStrings ["pub"] ["dart pub"] old.buildPhase; -}) \ No newline at end of file + meta.mainProgram = "jadb"; +} diff --git a/pub2nix.lock b/pub2nix.lock deleted file mode 100644 index a55e517..0000000 --- a/pub2nix.lock +++ /dev/null @@ -1,99 +0,0 @@ -packages: - collection: - dependency: direct main - description: - name: collection - url: https://pub.dartlang.org - source: hosted - version: 1.16.0 - sha256: 0nx7mbxwxw5z4mdjr9z8hg6g8kgy3cv5pv5ax0j1i9kl36brk5rg - ffi: - dependency: transitive - description: - name: ffi - url: https://pub.dartlang.org - source: hosted - version: 1.2.1 - sha256: 0dcivi3fk4kig3adkgrfc6nfkmx5x471x947ndwzv4rds4vahfq5 - js: - dependency: transitive - description: - name: js - url: https://pub.dartlang.org - source: hosted - version: 0.6.4 - sha256: 01knzh9890ygxpy59rsh77h2ilh69wyl83idvrcvwzk8fknjldkb - lints: - dependency: direct dev - description: - name: lints - url: https://pub.dartlang.org - source: hosted - version: 1.0.1 - sha256: 1xyn9xpzwfw1f0mp03pyvspcphkinhzawkgp5lwmi7p15mv1vgz2 - meta: - dependency: transitive - description: - name: meta - url: https://pub.dartlang.org - source: hosted - version: 1.8.0 - sha256: 01kqdd25nln5a219pr94s66p27m0kpqz0wpmwnm24kdy3ngif1v5 - path: - dependency: transitive - description: - name: path - url: https://pub.dartlang.org - source: hosted - version: 1.8.2 - sha256: 16ggdh29ciy7h8sdshhwmxn6dd12sfbykf2j82c56iwhhlljq181 - petitparser: - dependency: transitive - description: - name: petitparser - url: https://pub.dartlang.org - source: hosted - version: 5.0.0 - sha256: 01rcmvk1znjykph6znkd3skvfn61lj54km4xw6vwa5iwwg84p5ph - sqflite_common: - dependency: transitive - description: - name: sqflite_common - url: https://pub.dartlang.org - source: hosted - version: 2.2.1+1 - sha256: 1i3fmvgj0f1ynf03rd1x9r0bmxly333jyi392ghh1ahm0lnj1kzq - sqflite_common_ffi: - dependency: direct main - description: - name: sqflite_common_ffi - url: https://pub.dartlang.org - source: hosted - version: 2.1.1+1 - sha256: 00h6mi8m76kh48hilvz3gw0i01fy37vcgxfjc0jbyhzrxbx4paal - sqlite3: - dependency: transitive - description: - name: sqlite3 - url: https://pub.dartlang.org - source: hosted - version: 1.7.0 - sha256: 1x56g99nw3jqvx1ysggpmmvb9gap63wdxk0pjawzv47xxm058rhm - synchronized: - dependency: transitive - description: - name: synchronized - url: https://pub.dartlang.org - source: hosted - version: 3.0.0+2 - sha256: 1j6108cq1hbcqpwhk9sah8q3gcidd7222bzhha2nk9syxhzqy82i - xml: - dependency: direct main - description: - name: xml - url: https://pub.dartlang.org - source: hosted - version: 6.1.0 - sha256: 1pinq9zagchh2pk9d3ja3g8rljb3sl31qz2gw7djij7ih0dswxal -sdks: - dart: '>=2.17.0 <3.0.0' diff --git a/pubspec.lock b/pubspec.lock index 7d9c078..b6f194c 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,85 +5,105 @@ packages: dependency: "direct main" description: name: collection - url: "https://pub.dartlang.org" + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.19.1" ffi: dependency: transitive description: name: ffi - url: "https://pub.dartlang.org" + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" + url: "https://pub.dev" source: hosted - version: "1.2.1" - js: - dependency: transitive - description: - name: js - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.4" + version: "2.1.3" lints: dependency: "direct dev" description: name: lints - url: "https://pub.dartlang.org" + sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413" + url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "5.0.0" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.16.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.9.1" petitparser: dependency: transitive description: name: petitparser - url: "https://pub.dartlang.org" + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 + url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "6.0.2" sqflite_common: dependency: transitive description: name: sqflite_common - url: "https://pub.dartlang.org" + sha256: "4468b24876d673418a7b7147e5a08a715b4998a7ae69227acafaab762e0e5490" + url: "https://pub.dev" source: hosted - version: "2.2.1+1" + version: "2.5.4+5" sqflite_common_ffi: dependency: "direct main" description: name: sqflite_common_ffi - url: "https://pub.dartlang.org" + sha256: d316908f1537725427ff2827a5c5f3b2c1bc311caed985fe3c9b10939c9e11ca + url: "https://pub.dev" source: hosted - version: "2.1.1+1" + version: "2.3.4" sqlite3: dependency: transitive description: name: sqlite3 - url: "https://pub.dartlang.org" + sha256: bb174b3ec2527f9c5f680f73a89af8149dd99782fbb56ea88ad0807c5638f2ed + url: "https://pub.dev" source: hosted - version: "1.7.0" + version: "2.4.7" synchronized: dependency: transitive description: name: synchronized - url: "https://pub.dartlang.org" + sha256: "69fe30f3a8b04a0be0c15ae6490fc859a78ef4c43ae2dd5e8a623d45bfcf9225" + url: "https://pub.dev" source: hosted - version: "3.0.0+2" + version: "3.3.0+3" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + web: + dependency: transitive + description: + name: web + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb + url: "https://pub.dev" + source: hosted + version: "1.1.0" xml: dependency: "direct main" description: name: xml - url: "https://pub.dartlang.org" + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 + url: "https://pub.dev" source: hosted - version: "6.1.0" + version: "6.5.0" sdks: - dart: ">=2.17.0 <3.0.0" + dart: ">=3.5.0 <4.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 92d2178..3f4bc60 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,21 +1,21 @@ -name: ja_db +name: jadb description: A SQLite database containing open source japanese language translation data version: 1.0.0 -homepage: https://git.nani.wtf/h7x4/ja_db +homepage: https://git.nani.wtf/h7x4/jadb environment: - sdk: '>=2.16.1 <3.0.0' + sdk: '>=3.0.0 <4.0.0' dependencies: - collection: ^1.16.0 - sqflite_common_ffi: ^2.1.1 - xml: ^6.1.0 + collection: ^1.19.1 + sqflite_common_ffi: ^2.3.4 + xml: ^6.5.0 dev_dependencies: - lints: ^1.0.0 + lints: ^5.0.0 executables: - ja_db: ja_db + jadb: jadb platforms: linux: