From 41e1c03bd011203475398cf1f6b84c4d54a18c6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Vask=C3=B3?= <1771332+vlaci@users.noreply.github.com> Date: Mon, 11 Dec 2023 16:13:29 +0100 Subject: [PATCH 1/9] nix: properly override python3 package set --- overlay.nix | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/overlay.nix b/overlay.nix index 61faaa3a3b..e34856c58c 100644 --- a/overlay.nix +++ b/overlay.nix @@ -79,27 +79,26 @@ inputs: final: prev: }); - python3 = prev.python3 // { - pkgs = prev.python3.pkgs.overrideScope - (pyFinal: pyPrev: { - # Own package updated independently of nixpkgs - lzallright = pyFinal.callPackage ./nix/lzallright { }; + python3 = prev.python3.override { + packageOverrides = pyFinal: pyPrev: { + # Own package updated independently of nixpkgs + lzallright = pyFinal.callPackage ./nix/lzallright { }; - # Own package updated independently of nixpkgs - pyperscan = inputs.pyperscan.packages.${final.system}.default.vectorscan; + # Own package updated independently of nixpkgs + pyperscan = inputs.pyperscan.packages.${final.system}.default.vectorscan; - # Missing from nixpkgs - treelib = pyFinal.callPackage ./nix/treelib { }; + # Missing from nixpkgs + treelib = pyFinal.callPackage ./nix/treelib { }; - # Missing from nixpkgs - pyfatfs = pyFinal.callPackage ./nix/pyfatfs { }; + # Missing from nixpkgs + pyfatfs = pyFinal.callPackage ./nix/pyfatfs { }; - # The reason for everything - unblob = pyFinal.callPackage ./nix/unblob { }; + # The reason for everything + unblob = pyFinal.callPackage ./nix/unblob { }; - # Own package updated independently of nixpkgs - unblob-native = inputs.unblob-native.packages.${final.system}.default; - }); + # Own package updated independently of nixpkgs + unblob-native = inputs.unblob-native.packages.${final.system}.default; + }; }; # Existing alias is rebound to the updated package set for consistence From 92b5dc88829c5eeea6a346be9c98755c18047f10 Mon Sep 17 00:00:00 2001 From: Quentin Kaiser Date: Mon, 11 Dec 2023 16:13:46 +0100 Subject: [PATCH 2/9] chore(nix): move e2fsprogs to nvfetcher definition. --- nix/_sources/generated.json | 20 ++++++++++++++++++++ nix/_sources/generated.nix | 11 +++++++++++ nvfetcher.toml | 4 ++++ overlay.nix | 6 ------ 4 files changed, 35 insertions(+), 6 deletions(-) diff --git a/nix/_sources/generated.json b/nix/_sources/generated.json index 1c3e7b022c..aef899667e 100644 --- a/nix/_sources/generated.json +++ b/nix/_sources/generated.json @@ -1,4 +1,24 @@ { + "e2fsprogs": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "e2fsprogs", + "passthru": null, + "pinned": false, + "src": { + "deepClone": false, + "fetchSubmodules": false, + "leaveDotGit": false, + "name": null, + "owner": "onekey-sec", + "repo": "e2fsprogs", + "rev": "v1.47.0-3.ok1", + "sha256": "sha256-lGv1l9/guOEskvIE6DIsg/nRiDTvORZI0h7n623/fgU=", + "type": "github" + }, + "version": "v1.47.0-3.ok1" + }, "jefferson": { "cargoLocks": null, "date": null, diff --git a/nix/_sources/generated.nix b/nix/_sources/generated.nix index 8d8619a003..647d7bbdc5 100644 --- a/nix/_sources/generated.nix +++ b/nix/_sources/generated.nix @@ -1,6 +1,17 @@ # This file was generated by nvfetcher, please do not modify it manually. { fetchgit, fetchurl, fetchFromGitHub, dockerTools }: { + e2fsprogs = { + pname = "e2fsprogs"; + version = "v1.47.0-3.ok1"; + src = fetchFromGitHub { + owner = "onekey-sec"; + repo = "e2fsprogs"; + rev = "v1.47.0-3.ok1"; + fetchSubmodules = false; + sha256 = "sha256-lGv1l9/guOEskvIE6DIsg/nRiDTvORZI0h7n623/fgU="; + }; + }; jefferson = { pname = "jefferson"; version = "0.4.5"; diff --git a/nvfetcher.toml b/nvfetcher.toml index 998e279575..41aa5dbafd 100644 --- a/nvfetcher.toml +++ b/nvfetcher.toml @@ -22,3 +22,7 @@ fetch.pypi = "pyfatfs" [lief] src.github_tag = "lief-project/LIEF" fetch.github = "lief-project/LIEF" + +[e2fsprogs] +src.github_tag = "onekey-sec/e2fsprogs" +fetch.github = "onekey-sec/e2fsprogs" diff --git a/overlay.nix b/overlay.nix index e34856c58c..228645990b 100644 --- a/overlay.nix +++ b/overlay.nix @@ -9,12 +9,6 @@ inputs: final: prev: (super: { pname = "e2fsprogs-nofortify"; hardeningDisable = (super.hardeningDisable or [ ]) ++ [ "fortify3" ]; - - version = "1.47.0-3.ok1"; - src = prev.fetchurl { - url = "https://github.com/onekey-sec/e2fsprogs/archive/refs/tags/v1.47.0-3.ok1.tar.gz"; - hash = "sha256-fsLUySjAdgnRp5m405a4Egso+LXNLxR9Y7WHt8qAvFM="; - }; }); # Own package updated independently of nixpkgs From 715ccc268200fc289c58cfba89534eeb3fdaf386 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 10 Dec 2023 00:20:24 +0000 Subject: [PATCH 3/9] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'filter': 'github:numtide/nix-filter/41fd48e00c22b4ced525af521ead8792402de0ea' (2023-09-16) → 'github:numtide/nix-filter/c843418ecfd0344ecb85844b082ff5675e02c443' (2023-12-04) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/ec750fd01963ab6b20ee1f0cb488754e8036d89d' (2023-11-07) → 'github:NixOS/nixpkgs/09dc04054ba2ff1f861357d0e7e76d021b273cd7' (2023-12-08) • Updated input 'unblob-native': 'github:onekey-sec/unblob-native/d14b8743fa3265086a2cabcd2f0589fadaad9de8' (2023-11-06) → 'github:onekey-sec/unblob-native/69439fc0d33f2d8237c2ad57addcc497f189bd69' (2023-11-27) • Updated input 'unblob-native/advisory-db': 'github:rustsec/advisory-db/088ec034cfc17c918d8c1d4f9fbb832b935011b0' (2023-11-02) → 'github:rustsec/advisory-db/3338fcfb59cea5fcd7d2a4e7fe24cbc7cb778003' (2023-11-11) • Updated input 'unblob-native/crane': 'github:ipetkov/crane/2c89c36bffac32d8267e719f73b0d06e313ede30' (2023-11-03) → 'github:ipetkov/crane/ae7cd510e508ee03d792005c2f1c0a3ff25ecb80' (2023-11-18) • Updated input 'unblob-native/rust-overlay': 'github:oxalica/rust-overlay/321affd863e3e4e669990a1db5fdabef98387b95' (2023-11-03) → 'github:oxalica/rust-overlay/0309d58c91c57e8d519de68312430074de3ef5f8' (2023-11-25) --- flake.lock | 108 +++++++++++++---------------------------------------- 1 file changed, 26 insertions(+), 82 deletions(-) diff --git a/flake.lock b/flake.lock index 85c1e17b4c..2a4faa3c40 100644 --- a/flake.lock +++ b/flake.lock @@ -19,11 +19,11 @@ "advisory-db_2": { "flake": false, "locked": { - "lastModified": 1698930228, - "narHash": "sha256-ewxEUkQljd/D6jJyixlgQi0ZBFzYrhIY1EuoPylxkag=", + "lastModified": 1702116332, + "narHash": "sha256-Qzx1cRU8QnCmbEp0LJFoEzm7tetiNTc+wRTJTzPo2ko=", "owner": "rustsec", "repo": "advisory-db", - "rev": "088ec034cfc17c918d8c1d4f9fbb832b935011b0", + "rev": "6ef1d1fd84c57e46253ff16bf7379c115e1062eb", "type": "github" }, "original": { @@ -64,11 +64,11 @@ ] }, "locked": { - "lastModified": 1699030822, - "narHash": "sha256-a25bCHvTPJfAvK3qLoi5uI2pvwnOYhMQLRpJYNEt55o=", + "lastModified": 1702141249, + "narHash": "sha256-8wDpJKbDTDqFmyJfNEJOLrHYDoEzCjCbmz+lSRoU3CI=", "owner": "ipetkov", "repo": "crane", - "rev": "2c89c36bffac32d8267e719f73b0d06e313ede30", + "rev": "62fc1a0cbe144c1014d956e603d56bf1ffe69c7d", "type": "github" }, "original": { @@ -103,11 +103,11 @@ }, "filter": { "locked": { - "lastModified": 1694857738, - "narHash": "sha256-bxxNyLHjhu0N8T3REINXQ2ZkJco0ABFPn6PIe2QUfqo=", + "lastModified": 1701697642, + "narHash": "sha256-L217WytWZHSY8GW9Gx1A64OnNctbuDbfslaTEofXXRw=", "owner": "numtide", "repo": "nix-filter", - "rev": "41fd48e00c22b4ced525af521ead8792402de0ea", + "rev": "c843418ecfd0344ecb85844b082ff5675e02c443", "type": "github" }, "original": { @@ -189,29 +189,11 @@ "systems": "systems_3" }, "locked": { - "lastModified": 1694529238, - "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", "owner": "numtide", "repo": "flake-utils", - "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_4": { - "inputs": { - "systems": "systems_4" - }, - "locked": { - "lastModified": 1681202837, - "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "cfacdce06f30d2b68473a46042957675eebb3401", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", "type": "github" }, "original": { @@ -222,11 +204,11 @@ }, "nix-filter": { "locked": { - "lastModified": 1694857738, - "narHash": "sha256-bxxNyLHjhu0N8T3REINXQ2ZkJco0ABFPn6PIe2QUfqo=", + "lastModified": 1701697642, + "narHash": "sha256-L217WytWZHSY8GW9Gx1A64OnNctbuDbfslaTEofXXRw=", "owner": "numtide", "repo": "nix-filter", - "rev": "41fd48e00c22b4ced525af521ead8792402de0ea", + "rev": "c843418ecfd0344ecb85844b082ff5675e02c443", "type": "github" }, "original": { @@ -237,11 +219,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1699343069, - "narHash": "sha256-s7BBhyLA6MI6FuJgs4F/SgpntHBzz40/qV0xLPW6A1Q=", + "lastModified": 1702272962, + "narHash": "sha256-D+zHwkwPc6oYQ4G3A1HuadopqRwUY/JkMwHz1YF7j4Q=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ec750fd01963ab6b20ee1f0cb488754e8036d89d", + "rev": "e97b3e4186bcadf0ef1b6be22b8558eab1cdeb5d", "type": "github" }, "original": { @@ -262,11 +244,11 @@ ] }, "locked": { - "lastModified": 1690117095, - "narHash": "sha256-zzuVRFfFeQuytiC2MacjSJlPEiLGIVaNFCMS5mjI3o4=", + "lastModified": 1702369100, + "narHash": "sha256-ld7Ly7nOTlLeKXPpVyIZzY7dJJZ0HwkwoqXtd3kFCOo=", "ref": "main", - "rev": "18d76bf7ea372b6b0c12dcbd9d0a7f96c61452d1", - "revCount": 89, + "rev": "a53dfb3623e0d0e3a46639c590316b1dd767f5d9", + "revCount": 92, "submodules": true, "type": "git", "url": "https://github.com/vlaci/pyperscan/" @@ -315,28 +297,6 @@ "type": "github" } }, - "rust-overlay_2": { - "inputs": { - "flake-utils": "flake-utils_4", - "nixpkgs": [ - "unblob-native", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1698977568, - "narHash": "sha256-bnbCqPDFdOUcSANJv9Br3q/b1LyK9vyB1I7os5T4jXI=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "321affd863e3e4e669990a1db5fdabef98387b95", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, "sasquatch": { "inputs": { "nixpkgs": [ @@ -402,21 +362,6 @@ "type": "github" } }, - "systems_4": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "unblob-native": { "inputs": { "advisory-db": "advisory-db_2", @@ -425,15 +370,14 @@ "nix-filter": "nix-filter", "nixpkgs": [ "nixpkgs" - ], - "rust-overlay": "rust-overlay_2" + ] }, "locked": { - "lastModified": 1699255002, - "narHash": "sha256-H92/rY8rWaC/w3BeKy5E5+AAlLBYsID+L0OuksTw9+I=", + "lastModified": 1702559080, + "narHash": "sha256-RyLUjE+X3aINHrjzFDYITjX85UM+crEDpT9Fz5NHaJs=", "owner": "onekey-sec", "repo": "unblob-native", - "rev": "d14b8743fa3265086a2cabcd2f0589fadaad9de8", + "rev": "73fcc0b11f3055acc1025275ebb9756a634d8e8a", "type": "github" }, "original": { From 014d0c0838929cf739912a25a185828bd34e6add Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Vask=C3=B3?= <1771332+vlaci@users.noreply.github.com> Date: Fri, 15 Dec 2023 11:38:23 +0100 Subject: [PATCH 4/9] nix: switch to using overlays for unblob-native and pyperscan --- flake.nix | 8 ++++---- overlay.nix | 27 +++++++++------------------ 2 files changed, 13 insertions(+), 22 deletions(-) diff --git a/flake.nix b/flake.nix index e1acba8d33..0d221890bb 100644 --- a/flake.nix +++ b/flake.nix @@ -8,7 +8,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; inputs.pyperscan = { - url = "git+https://github.com/vlaci/pyperscan/?ref=main&submodules=1"; + url = "github:vlaci/pyperscan"; inputs.nixpkgs.follows = "nixpkgs"; }; inputs.sasquatch = { @@ -47,9 +47,9 @@ overlays.default = nixpkgs.lib.composeManyExtensions [ filter.overlays.default sasquatch.overlays.default - (import ./overlay.nix { - inherit pyperscan unblob-native; - }) + unblob-native.overlays.default + pyperscan.overlays.default + (import ./overlay.nix) ]; packages = forAllSystems (system: rec { inherit (nixpkgsFor.${system}) unblob; diff --git a/overlay.nix b/overlay.nix index 228645990b..8f545c6fde 100644 --- a/overlay.nix +++ b/overlay.nix @@ -1,4 +1,4 @@ -inputs: final: prev: +final: prev: { inherit (final.python3.pkgs) unblob; @@ -73,30 +73,21 @@ inputs: final: prev: }); - python3 = prev.python3.override { - packageOverrides = pyFinal: pyPrev: { + pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [ + (python-final: python-prev: { # Own package updated independently of nixpkgs - lzallright = pyFinal.callPackage ./nix/lzallright { }; - - # Own package updated independently of nixpkgs - pyperscan = inputs.pyperscan.packages.${final.system}.default.vectorscan; + lzallright = python-final.callPackage ./nix/lzallright { }; # Missing from nixpkgs - treelib = pyFinal.callPackage ./nix/treelib { }; + treelib = python-final.callPackage ./nix/treelib { }; # Missing from nixpkgs - pyfatfs = pyFinal.callPackage ./nix/pyfatfs { }; + pyfatfs = python-final.callPackage ./nix/pyfatfs { }; # The reason for everything - unblob = pyFinal.callPackage ./nix/unblob { }; - - # Own package updated independently of nixpkgs - unblob-native = inputs.unblob-native.packages.${final.system}.default; - }; - }; - - # Existing alias is rebound to the updated package set for consistence - python3Packages = final.python3.pkgs; + unblob = python-final.callPackage ./nix/unblob { }; + }) + ]; # Own package updated independently of nixpkgs ubi_reader = final.callPackage ./nix/ubi_reader { }; From 7f24af32d8d25139307ebd7081e4523cd1740350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Vask=C3=B3?= <1771332+vlaci@users.noreply.github.com> Date: Fri, 15 Dec 2023 13:36:14 +0100 Subject: [PATCH 5/9] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'pyperscan': 'git+https://github.com/vlaci/pyperscan/?ref=main&rev=a53dfb3623e0d0e3a46639c590316b1dd767f5d9' (2023-12-12) → 'github:vlaci/pyperscan/ea38e0770de2fa175d0f5fbe09861bb51742762f' (2023-12-15) • Updated input 'pyperscan/advisory-db': 'github:rustsec/advisory-db/5ceeefcbbabf4b510ef8ede121d6dc57d1a1f7f8' (2023-07-08) → 'github:rustsec/advisory-db/6ef1d1fd84c57e46253ff16bf7379c115e1062eb' (2023-12-09) • Updated input 'pyperscan/crane': 'github:ipetkov/crane/8b08e96c9af8c6e3a2b69af5a7fa168750fcf88e' (2023-07-07) → 'github:ipetkov/crane/62fc1a0cbe144c1014d956e603d56bf1ffe69c7d' (2023-12-09) • Removed input 'pyperscan/crane/flake-compat' • Removed input 'pyperscan/crane/flake-utils' • Removed input 'pyperscan/crane/flake-utils/systems' • Removed input 'pyperscan/crane/rust-overlay' • Removed input 'pyperscan/crane/rust-overlay/flake-utils' • Removed input 'pyperscan/crane/rust-overlay/nixpkgs' • Updated input 'pyperscan/fenix': 'github:nix-community/fenix/31f37ee3e471af1b40f6d0c9657f77062bb13ee3' (2023-07-14) → 'github:nix-community/fenix/7622e4a2d4378861d9e83fc02c1eeb0e084bf3f2' (2023-12-12) • Removed input 'pyperscan/flake-utils' • Removed input 'pyperscan/flake-utils/systems' --- flake.lock | 156 +++++++---------------------------------------------- 1 file changed, 20 insertions(+), 136 deletions(-) diff --git a/flake.lock b/flake.lock index 2a4faa3c40..96d2c0bf84 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "advisory-db": { "flake": false, "locked": { - "lastModified": 1688825073, - "narHash": "sha256-fK2huTDGHJc/oZjZWhMZMAt1nQSuuY6p41Y2pudtJdM=", + "lastModified": 1702116332, + "narHash": "sha256-Qzx1cRU8QnCmbEp0LJFoEzm7tetiNTc+wRTJTzPo2ko=", "owner": "rustsec", "repo": "advisory-db", - "rev": "5ceeefcbbabf4b510ef8ede121d6dc57d1a1f7f8", + "rev": "6ef1d1fd84c57e46253ff16bf7379c115e1062eb", "type": "github" }, "original": { @@ -34,20 +34,17 @@ }, "crane": { "inputs": { - "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils", "nixpkgs": [ "pyperscan", "nixpkgs" - ], - "rust-overlay": "rust-overlay" + ] }, "locked": { - "lastModified": 1688772518, - "narHash": "sha256-ol7gZxwvgLnxNSZwFTDJJ49xVY5teaSvF7lzlo3YQfM=", + "lastModified": 1702141249, + "narHash": "sha256-8wDpJKbDTDqFmyJfNEJOLrHYDoEzCjCbmz+lSRoU3CI=", "owner": "ipetkov", "repo": "crane", - "rev": "8b08e96c9af8c6e3a2b69af5a7fa168750fcf88e", + "rev": "62fc1a0cbe144c1014d956e603d56bf1ffe69c7d", "type": "github" }, "original": { @@ -88,11 +85,11 @@ ] }, "locked": { - "lastModified": 1689315904, - "narHash": "sha256-sztnVLSgeLNJSvvY2ggzxkswlzcN7gthNzjOfpCCToU=", + "lastModified": 1702362203, + "narHash": "sha256-etsSWZfvmVA9RWqixmoKTf+JLEMtjlOaLxh/tK80ZCg=", "owner": "nix-community", "repo": "fenix", - "rev": "31f37ee3e471af1b40f6d0c9657f77062bb13ee3", + "rev": "7622e4a2d4378861d9e83fc02c1eeb0e084bf3f2", "type": "github" }, "original": { @@ -132,62 +129,10 @@ "type": "github" } }, - "flake-compat_2": { - "flake": false, - "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-utils": { "inputs": { "systems": "systems" }, - "locked": { - "lastModified": 1687709756, - "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { - "inputs": { - "systems": "systems_2" - }, - "locked": { - "lastModified": 1689068808, - "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_3": { - "inputs": { - "systems": "systems_3" - }, "locked": { "lastModified": 1701680307, "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", @@ -238,26 +183,22 @@ "advisory-db": "advisory-db", "crane": "crane", "fenix": "fenix", - "flake-utils": "flake-utils_2", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1702369100, - "narHash": "sha256-ld7Ly7nOTlLeKXPpVyIZzY7dJJZ0HwkwoqXtd3kFCOo=", - "ref": "main", - "rev": "a53dfb3623e0d0e3a46639c590316b1dd767f5d9", - "revCount": 92, - "submodules": true, - "type": "git", - "url": "https://github.com/vlaci/pyperscan/" + "lastModified": 1702643335, + "narHash": "sha256-3yBBz4lCU3namRlYhSt1vH6WcIo1sbwpgNabV0idF6Q=", + "owner": "vlaci", + "repo": "pyperscan", + "rev": "ea38e0770de2fa175d0f5fbe09861bb51742762f", + "type": "github" }, "original": { - "ref": "main", - "submodules": true, - "type": "git", - "url": "https://github.com/vlaci/pyperscan/" + "owner": "vlaci", + "repo": "pyperscan", + "type": "github" } }, "root": { @@ -270,33 +211,6 @@ "unblob-native": "unblob-native" } }, - "rust-overlay": { - "inputs": { - "flake-utils": [ - "pyperscan", - "crane", - "flake-utils" - ], - "nixpkgs": [ - "pyperscan", - "crane", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1688351637, - "narHash": "sha256-CLTufJ29VxNOIZ8UTg0lepsn3X03AmopmaLTTeHDCL4=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "f9b92316727af9e6c7fee4a761242f7f46880329", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, "sasquatch": { "inputs": { "nixpkgs": [ @@ -332,41 +246,11 @@ "type": "github" } }, - "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_3": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "unblob-native": { "inputs": { "advisory-db": "advisory-db_2", "crane": "crane_2", - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils", "nix-filter": "nix-filter", "nixpkgs": [ "nixpkgs" From 71126d769227d15603e76eb7b84dcb87b7f881cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Vask=C3=B3?= <1771332+vlaci@users.noreply.github.com> Date: Fri, 15 Dec 2023 11:51:56 +0100 Subject: [PATCH 6/9] nix: add `which` dependency for tests It is required since we are on debian's branch --- overlay.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/overlay.nix b/overlay.nix index 8f545c6fde..e5cb126a5f 100644 --- a/overlay.nix +++ b/overlay.nix @@ -9,6 +9,7 @@ final: prev: (super: { pname = "e2fsprogs-nofortify"; hardeningDisable = (super.hardeningDisable or [ ]) ++ [ "fortify3" ]; + nativeCheckInputs = (super.nativeCheckInputs or [ ]) ++ [ final.which ]; }); # Own package updated independently of nixpkgs From bf6a584c8206a98463ef0c31787175ab05fc456a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Vask=C3=B3?= <1771332+vlaci@users.noreply.github.com> Date: Fri, 15 Dec 2023 13:16:54 +0100 Subject: [PATCH 7/9] nix: use lzallright through an overlay so it matches with how unblob-native and pyperscan is used --- flake.nix | 7 +- nix/_sources/generated.json | 27 +- nix/_sources/generated.nix | 25 +- nix/_sources/lzallright-v0.2.3/Cargo.lock | 870 ---------------------- nix/lzallright/default.nix | 24 - nvfetcher.toml | 5 - overlay.nix | 3 - 7 files changed, 11 insertions(+), 950 deletions(-) delete mode 100644 nix/_sources/lzallright-v0.2.3/Cargo.lock delete mode 100644 nix/lzallright/default.nix diff --git a/flake.nix b/flake.nix index 0d221890bb..1460368f9b 100644 --- a/flake.nix +++ b/flake.nix @@ -7,6 +7,10 @@ url = "github:onekey-sec/unblob-native"; inputs.nixpkgs.follows = "nixpkgs"; }; + inputs.lzallright = { + url = "github:vlaci/lzallright"; + inputs.nixpkgs.follows = "nixpkgs"; + }; inputs.pyperscan = { url = "github:vlaci/pyperscan"; inputs.nixpkgs.follows = "nixpkgs"; @@ -27,7 +31,7 @@ ]; }; - outputs = { self, nixpkgs, filter, unblob-native, pyperscan, sasquatch, ... }: + outputs = { self, nixpkgs, filter, unblob-native, lzallright, pyperscan, sasquatch, ... }: let # System types to support. supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ]; @@ -48,6 +52,7 @@ filter.overlays.default sasquatch.overlays.default unblob-native.overlays.default + lzallright.overlays.default pyperscan.overlays.default (import ./overlay.nix) ]; diff --git a/nix/_sources/generated.json b/nix/_sources/generated.json index aef899667e..e3d1d53791 100644 --- a/nix/_sources/generated.json +++ b/nix/_sources/generated.json @@ -54,31 +54,6 @@ }, "version": "0.13.2" }, - "lzallright": { - "cargoLocks": { - "Cargo.lock": [ - "./lzallright-v0.2.3/Cargo.lock", - {} - ] - }, - "date": null, - "extract": null, - "name": "lzallright", - "passthru": null, - "pinned": false, - "src": { - "deepClone": false, - "fetchSubmodules": false, - "leaveDotGit": false, - "name": null, - "owner": "vlaci", - "repo": "lzallright", - "rev": "v0.2.3", - "sha256": "sha256-Zzif6WtecgAkNmml0kt0Z+Ewx0L30ahr+kwzYR5aUAM=", - "type": "github" - }, - "version": "v0.2.3" - }, "pyfatfs": { "cargoLocks": null, "date": null, @@ -124,4 +99,4 @@ }, "version": "0.8.9" } -} \ No newline at end of file +} diff --git a/nix/_sources/generated.nix b/nix/_sources/generated.nix index 647d7bbdc5..801cd931a5 100644 --- a/nix/_sources/generated.nix +++ b/nix/_sources/generated.nix @@ -16,7 +16,7 @@ pname = "jefferson"; version = "0.4.5"; src = fetchurl { - url = "https://pypi.org/packages/source/j/jefferson/jefferson-0.4.5.tar.gz"; + url = "https://files.pythonhosted.org/packages/source/j/jefferson/jefferson-0.4.5.tar.gz"; sha256 = "sha256-+cPOzzO3bCQAu8LrbjUJ5S/SR5OFitOYLIu5L9t/q+k="; }; }; @@ -31,28 +31,11 @@ sha256 = "sha256-lH4SqwPB2Jp/wUI2Cll67PQbHbwMqpNuLy/ei8roiHg="; }; }; - lzallright = { - pname = "lzallright"; - version = "v0.2.3"; - src = fetchFromGitHub { - owner = "vlaci"; - repo = "lzallright"; - rev = "v0.2.3"; - fetchSubmodules = false; - sha256 = "sha256-Zzif6WtecgAkNmml0kt0Z+Ewx0L30ahr+kwzYR5aUAM="; - }; - cargoLock."Cargo.lock" = { - lockFile = ./lzallright-v0.2.3/Cargo.lock; - outputHashes = { - - }; - }; - }; pyfatfs = { pname = "pyfatfs"; version = "1.0.5"; src = fetchurl { - url = "https://pypi.org/packages/source/p/pyfatfs/pyfatfs-1.0.5.tar.gz"; + url = "https://files.pythonhosted.org/packages/source/p/pyfatfs/pyfatfs-1.0.5.tar.gz"; sha256 = "sha256-5J6gYhGf32GYx7u8/ghYnYkZ40rCH19gTQ7YtcREly0="; }; }; @@ -60,7 +43,7 @@ pname = "treelib"; version = "1.7.0"; src = fetchurl { - url = "https://pypi.org/packages/source/t/treelib/treelib-1.7.0.tar.gz"; + url = "https://files.pythonhosted.org/packages/source/t/treelib/treelib-1.7.0.tar.gz"; sha256 = "sha256-m/8a9Ba55kKmzQ4EMdFe3yaiS40MiuaK+9OAG14w+2E="; }; }; @@ -68,7 +51,7 @@ pname = "ubi_reader"; version = "0.8.9"; src = fetchurl { - url = "https://pypi.org/packages/source/u/ubi_reader/ubi_reader-0.8.9.tar.gz"; + url = "https://files.pythonhosted.org/packages/source/u/ubi_reader/ubi_reader-0.8.9.tar.gz"; sha256 = "sha256-b6Jp8xB6jie35F/oLEea1RF+F8J64AiiQE3/ufwu1mE="; }; }; diff --git a/nix/_sources/lzallright-v0.2.3/Cargo.lock b/nix/_sources/lzallright-v0.2.3/Cargo.lock deleted file mode 100644 index 0f94b80fcc..0000000000 --- a/nix/_sources/lzallright-v0.2.3/Cargo.lock +++ /dev/null @@ -1,870 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bumpalo" -version = "3.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b1ce199063694f33ffb7dd4e0ee620741495c32833cde5aa08f02a0bf96f0c8" - -[[package]] -name = "cast" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" - -[[package]] -name = "cc" -version = "1.0.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "clap" -version = "2.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" -dependencies = [ - "bitflags", - "textwrap", - "unicode-width", -] - -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] - -[[package]] -name = "criterion" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b01d6de93b2b6c65e17c634a26653a29d107b3c98c607c765bf38d041531cd8f" -dependencies = [ - "atty", - "cast", - "clap", - "criterion-plot", - "csv", - "itertools", - "lazy_static", - "num-traits", - "oorandom", - "plotters", - "rayon", - "regex", - "serde", - "serde_cbor", - "serde_derive", - "serde_json", - "tinytemplate", - "walkdir", -] - -[[package]] -name = "criterion-plot" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2673cc8207403546f45f5fd319a974b1e6983ad1a3ee7e6041650013be041876" -dependencies = [ - "cast", - "itertools", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" -dependencies = [ - "cfg-if", - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" -dependencies = [ - "autocfg", - "cfg-if", - "crossbeam-utils", - "memoffset", - "scopeguard", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "csv" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b015497079b9a9d69c02ad25de6c0a6edef051ea6360a327d0bd05802ef64ad" -dependencies = [ - "csv-core", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "csv-core" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" -dependencies = [ - "memchr", -] - -[[package]] -name = "cxx" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" -dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", -] - -[[package]] -name = "cxx-build" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" -dependencies = [ - "cc", - "codespan-reporting", - "once_cell", - "proc-macro2", - "quote", - "scratch", - "syn 2.0.15", -] - -[[package]] -name = "cxxbridge-flags" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" - -[[package]] -name = "cxxbridge-macro" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.15", -] - -[[package]] -name = "either" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" - -[[package]] -name = "half" -version = "1.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "indoc" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa799dd5ed20a7e349f3b4639aa80d74549c81716d9ec4f994c9b5815598306" - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" - -[[package]] -name = "js-sys" -version = "0.3.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "libc" -version = "0.2.142" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a987beff54b60ffa6d51982e1aa1146bc42f19bd26be28b0586f252fccf5317" - -[[package]] -name = "link-cplusplus" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" -dependencies = [ - "cc", -] - -[[package]] -name = "lock_api" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "lzallright" -version = "0.2.3" -dependencies = [ - "criterion", - "cxx", - "lzokay-sys", - "pyo3", -] - -[[package]] -name = "lzokay-sys" -version = "0.2.3" -dependencies = [ - "cxx", - "cxx-build", -] - -[[package]] -name = "memchr" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" - -[[package]] -name = "memoffset" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num-traits" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_cpus" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" -dependencies = [ - "hermit-abi 0.2.6", - "libc", -] - -[[package]] -name = "once_cell" -version = "1.17.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" - -[[package]] -name = "oorandom" -version = "11.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" - -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-sys", -] - -[[package]] -name = "plotters" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2538b639e642295546c50fcd545198c9d64ee2a38620a628724a3b266d5fbf97" -dependencies = [ - "num-traits", - "plotters-backend", - "plotters-svg", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "plotters-backend" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "193228616381fecdc1224c62e96946dfbc73ff4384fba576e052ff8c1bea8142" - -[[package]] -name = "plotters-svg" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a81d2759aae1dae668f783c308bc5c8ebd191ff4184aaa1b37f65a6ae5a56f" -dependencies = [ - "plotters-backend", -] - -[[package]] -name = "proc-macro2" -version = "1.0.56" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "pyo3" -version = "0.18.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b1ac5b3731ba34fdaa9785f8d74d17448cd18f30cf19e0c7e7b1fdb5272109" -dependencies = [ - "cfg-if", - "indoc", - "libc", - "memoffset", - "parking_lot", - "pyo3-build-config", - "pyo3-ffi", - "pyo3-macros", - "unindent", -] - -[[package]] -name = "pyo3-build-config" -version = "0.18.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cb946f5ac61bb61a5014924910d936ebd2b23b705f7a4a3c40b05c720b079a3" -dependencies = [ - "once_cell", - "target-lexicon", -] - -[[package]] -name = "pyo3-ffi" -version = "0.18.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd4d7c5337821916ea2a1d21d1092e8443cf34879e53a0ac653fbb98f44ff65c" -dependencies = [ - "libc", - "pyo3-build-config", -] - -[[package]] -name = "pyo3-macros" -version = "0.18.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9d39c55dab3fc5a4b25bbd1ac10a2da452c4aca13bb450f22818a002e29648d" -dependencies = [ - "proc-macro2", - "pyo3-macros-backend", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "pyo3-macros-backend" -version = "0.18.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97daff08a4c48320587b5224cc98d609e3c27b6d437315bd40b605c98eeb5918" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "quote" -version = "1.0.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rayon" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" -dependencies = [ - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-utils", - "num_cpus", -] - -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags", -] - -[[package]] -name = "regex" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" -dependencies = [ - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" - -[[package]] -name = "ryu" -version = "1.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "scratch" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" - -[[package]] -name = "serde" -version = "1.0.162" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71b2f6e1ab5c2b98c05f0f35b236b22e8df7ead6ffbf51d7808da7f8817e7ab6" - -[[package]] -name = "serde_cbor" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" -dependencies = [ - "half", - "serde", -] - -[[package]] -name = "serde_derive" -version = "1.0.162" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2a0814352fd64b58489904a44ea8d90cb1a91dcb6b4f5ebabc32c8318e93cb6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.15", -] - -[[package]] -name = "serde_json" -version = "1.0.96" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "smallvec" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "target-lexicon" -version = "0.12.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5" - -[[package]] -name = "termcolor" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] - -[[package]] -name = "tinytemplate" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" -dependencies = [ - "serde", - "serde_json", -] - -[[package]] -name = "unicode-ident" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" - -[[package]] -name = "unicode-width" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" - -[[package]] -name = "unindent" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1766d682d402817b5ac4490b3c3002d91dfa0d22812f341609f97b08757359c" - -[[package]] -name = "walkdir" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "wasm-bindgen" -version = "0.2.84" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.84" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 1.0.109", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.84" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.84" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.84" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" - -[[package]] -name = "web-sys" -version = "0.3.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" diff --git a/nix/lzallright/default.nix b/nix/lzallright/default.nix deleted file mode 100644 index 0efc093b40..0000000000 --- a/nix/lzallright/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ _sources -, lib -, stdenv -, buildPythonPackage -, rustPlatform -, libiconv -}: - -buildPythonPackage rec { - inherit (_sources.lzallright) pname version src; - - cargoDeps = rustPlatform.importCargoLock - _sources.lzallright.cargoLock."Cargo.lock"; - - format = "pyproject"; - - nativeBuildInputs = with rustPlatform; [ cargoSetupHook maturinBuildHook ]; - - buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; - - pythonImportsCheck = [ "lzallright" ]; - - doCheck = false; -} diff --git a/nvfetcher.toml b/nvfetcher.toml index 41aa5dbafd..f9750e71fb 100644 --- a/nvfetcher.toml +++ b/nvfetcher.toml @@ -1,8 +1,3 @@ -[lzallright] -src.github_tag = "vlaci/lzallright" -fetch.github = "vlaci/lzallright" -cargo_locks = [ "Cargo.lock" ] - [jefferson] src.pypi = "jefferson" fetch.pypi = "jefferson" diff --git a/overlay.nix b/overlay.nix index e5cb126a5f..1eba434b05 100644 --- a/overlay.nix +++ b/overlay.nix @@ -76,9 +76,6 @@ final: prev: pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [ (python-final: python-prev: { - # Own package updated independently of nixpkgs - lzallright = python-final.callPackage ./nix/lzallright { }; - # Missing from nixpkgs treelib = python-final.callPackage ./nix/treelib { }; From d14d9159b4f3b1381d00f7d9c6fb35e8529ce3df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Vask=C3=B3?= <1771332+vlaci@users.noreply.github.com> Date: Fri, 15 Dec 2023 13:36:51 +0100 Subject: [PATCH 8/9] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Added input 'lzallright': 'github:vlaci/lzallright/ed5314d505881850626398184d772f4c8ab4cb0a' (2023-12-15) • Added input 'lzallright/advisory-db': 'github:rustsec/advisory-db/6ef1d1fd84c57e46253ff16bf7379c115e1062eb' (2023-12-09) • Added input 'lzallright/crane': 'github:ipetkov/crane/62fc1a0cbe144c1014d956e603d56bf1ffe69c7d' (2023-12-09) • Added input 'lzallright/crane/nixpkgs': follows 'lzallright/nixpkgs' • Added input 'lzallright/fenix': 'github:nix-community/fenix/aa632e1b140686853a226fa0bf85ae8ebbf72aab' (2023-12-09) • Added input 'lzallright/fenix/nixpkgs': follows 'lzallright/nixpkgs' • Added input 'lzallright/fenix/rust-analyzer-src': follows 'lzallright' • Added input 'lzallright/flake-utils': 'github:numtide/flake-utils/4022d587cbbfd70fe950c1e2083a02621806a725' (2023-12-04) • Added input 'lzallright/flake-utils/systems': 'github:nix-systems/default/da67096a3b9bf56a91d16901293e51ba5b49a27e' (2023-04-09) • Added input 'lzallright/nixpkgs': follows 'nixpkgs' --- flake.lock | 133 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 126 insertions(+), 7 deletions(-) diff --git a/flake.lock b/flake.lock index 96d2c0bf84..9d3ee48fb9 100644 --- a/flake.lock +++ b/flake.lock @@ -32,10 +32,26 @@ "type": "github" } }, + "advisory-db_3": { + "flake": false, + "locked": { + "lastModified": 1702116332, + "narHash": "sha256-Qzx1cRU8QnCmbEp0LJFoEzm7tetiNTc+wRTJTzPo2ko=", + "owner": "rustsec", + "repo": "advisory-db", + "rev": "6ef1d1fd84c57e46253ff16bf7379c115e1062eb", + "type": "github" + }, + "original": { + "owner": "rustsec", + "repo": "advisory-db", + "type": "github" + } + }, "crane": { "inputs": { "nixpkgs": [ - "pyperscan", + "lzallright", "nixpkgs" ] }, @@ -54,6 +70,27 @@ } }, "crane_2": { + "inputs": { + "nixpkgs": [ + "pyperscan", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1702141249, + "narHash": "sha256-8wDpJKbDTDqFmyJfNEJOLrHYDoEzCjCbmz+lSRoU3CI=", + "owner": "ipetkov", + "repo": "crane", + "rev": "62fc1a0cbe144c1014d956e603d56bf1ffe69c7d", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "crane_3": { "inputs": { "nixpkgs": [ "unblob-native", @@ -75,6 +112,30 @@ } }, "fenix": { + "inputs": { + "nixpkgs": [ + "lzallright", + "nixpkgs" + ], + "rust-analyzer-src": [ + "lzallright" + ] + }, + "locked": { + "lastModified": 1702102859, + "narHash": "sha256-CBSgHrESkKDgbt4RdzfCBinknJrvQ1WjewajVtRQLVI=", + "owner": "nix-community", + "repo": "fenix", + "rev": "aa632e1b140686853a226fa0bf85ae8ebbf72aab", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, + "fenix_2": { "inputs": { "nixpkgs": [ "pyperscan", @@ -147,6 +208,48 @@ "type": "github" } }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "lzallright": { + "inputs": { + "advisory-db": "advisory-db", + "crane": "crane", + "fenix": "fenix", + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1702642458, + "narHash": "sha256-S2AQHuR7UnOCXfXN7tY66Nq/BOBDwzluN40wCL3kvWQ=", + "owner": "vlaci", + "repo": "lzallright", + "rev": "ed5314d505881850626398184d772f4c8ab4cb0a", + "type": "github" + }, + "original": { + "owner": "vlaci", + "repo": "lzallright", + "type": "github" + } + }, "nix-filter": { "locked": { "lastModified": 1701697642, @@ -180,9 +283,9 @@ }, "pyperscan": { "inputs": { - "advisory-db": "advisory-db", - "crane": "crane", - "fenix": "fenix", + "advisory-db": "advisory-db_2", + "crane": "crane_2", + "fenix": "fenix_2", "nixpkgs": [ "nixpkgs" ] @@ -205,6 +308,7 @@ "inputs": { "filter": "filter", "flake-compat": "flake-compat", + "lzallright": "lzallright", "nixpkgs": "nixpkgs", "pyperscan": "pyperscan", "sasquatch": "sasquatch", @@ -246,11 +350,26 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "unblob-native": { "inputs": { - "advisory-db": "advisory-db_2", - "crane": "crane_2", - "flake-utils": "flake-utils", + "advisory-db": "advisory-db_3", + "crane": "crane_3", + "flake-utils": "flake-utils_2", "nix-filter": "nix-filter", "nixpkgs": [ "nixpkgs" From f9158f31ff58b5717e79348fcf1e7d4e6d267591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Vask=C3=B3?= <1771332+vlaci@users.noreply.github.com> Date: Fri, 15 Dec 2023 16:07:22 +0100 Subject: [PATCH 9/9] nix: update builder to macos-12 11 has some issues: https://github.com/NixOS/nixpkgs/issues/269548 --- .github/workflows/build-nix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-nix.yml b/.github/workflows/build-nix.yml index a5ce749275..e502c164ea 100644 --- a/.github/workflows/build-nix.yml +++ b/.github/workflows/build-nix.yml @@ -13,7 +13,7 @@ jobs: arch: x86_64-linux - os: ubuntu-latest arch: aarch64-linux - - os: macos-11 + - os: macos-12 arch: x86_64-darwin name: Build Nix - ${{ matrix.arch }}.${{ matrix.os }} runs-on: ${{ matrix.os }}