From b469ab191decb62d1aece688c0e3af7fd8bf5ef9 Mon Sep 17 00:00:00 2001 From: thesimplekid Date: Mon, 15 Jul 2024 09:40:25 +0100 Subject: [PATCH] chore: old flake --- flake.lock | 231 ++--------------------------------------------------- flake.nix | 65 +++------------ 2 files changed, 21 insertions(+), 275 deletions(-) diff --git a/flake.lock b/flake.lock index f80f2dc..0cbb7b8 100644 --- a/flake.lock +++ b/flake.lock @@ -1,93 +1,22 @@ { "nodes": { - "android-nixpkgs": { - "inputs": { - "devshell": "devshell", - "flake-utils": "flake-utils_3", - "nixpkgs": [ - "flakebox", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1719001124, - "narHash": "sha256-JXrMwYlQarZPyjN5UkD4fS9mrHSE1PUa7P//1Z5Sqr0=", - "owner": "tadfisher", - "repo": "android-nixpkgs", - "rev": "7fa1348249564e43185d3053f579f9fa923d46cc", - "type": "github" - }, - "original": { - "owner": "tadfisher", - "repo": "android-nixpkgs", - "rev": "7fa1348249564e43185d3053f579f9fa923d46cc", - "type": "github" - } - }, "crane": { "inputs": { "nixpkgs": [ - "flakebox", "nixpkgs" ] }, "locked": { - "lastModified": 1717383740, - "narHash": "sha256-559HbY4uhNeoYvK3H6AMZAtVfmR3y8plXZ1x6ON/cWU=", + "lastModified": 1720975002, + "narHash": "sha256-1i521ecK2MFg+lxSk9oRx/C0SsdlI6GS6eYT79nA6TA=", "owner": "ipetkov", "repo": "crane", - "rev": "b65673fce97d277934488a451724be94cc62499a", + "rev": "1791a5b98d2c1bf143ad85469abcfa2426f3f087", "type": "github" }, "original": { "owner": "ipetkov", "repo": "crane", - "rev": "b65673fce97d277934488a451724be94cc62499a", - "type": "github" - } - }, - "devshell": { - "inputs": { - "flake-utils": "flake-utils_2", - "nixpkgs": [ - "flakebox", - "android-nixpkgs", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1717408969, - "narHash": "sha256-Q0OEFqe35fZbbRPPRdrjTUUChKVhhWXz3T9ZSKmaoVY=", - "owner": "numtide", - "repo": "devshell", - "rev": "1ebbe68d57457c8cae98145410b164b5477761f4", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "devshell", - "type": "github" - } - }, - "fenix": { - "inputs": { - "nixpkgs": [ - "flakebox", - "nixpkgs" - ], - "rust-analyzer-src": "rust-analyzer-src" - }, - "locked": { - "lastModified": 1717827974, - "narHash": "sha256-ixopuTeTouxqTxfMuzs6IaRttbT8JqRW5C9Q/57WxQw=", - "owner": "nix-community", - "repo": "fenix", - "rev": "ab655c627777ab5f9964652fe23bbb1dfbd687a8", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "fenix", "type": "github" } }, @@ -106,172 +35,28 @@ "type": "github" } }, - "flake-utils_2": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_3": { - "inputs": { - "systems": "systems_2" - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_4": { - "inputs": { - "systems": [ - "flakebox", - "systems" - ] - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flakebox": { - "inputs": { - "android-nixpkgs": "android-nixpkgs", - "crane": "crane", - "fenix": "fenix", - "flake-utils": "flake-utils_4", - "nixpkgs": [ - "nixpkgs" - ], - "systems": "systems_3" - }, - "locked": { - "lastModified": 1720463890, - "narHash": "sha256-C5bQ8jHIHm2fwh3U/uEANmHYL7vRAHq6S7SNqyakYMI=", - "owner": "rustshop", - "repo": "flakebox", - "rev": "ead24017440df8c5fd75cdb04c16d13c7d6fa50d", - "type": "github" - }, - "original": { - "owner": "rustshop", - "repo": "flakebox", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1720691131, - "narHash": "sha256-CWT+KN8aTPyMIx8P303gsVxUnkinIz0a/Cmasz1jyIM=", + "lastModified": 1720955038, + "narHash": "sha256-GaliJqfFwyYxReFywxAa8orCO+EnDq2NK2F+5aSc8vo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a046c1202e11b62cbede5385ba64908feb7bfac4", + "rev": "aa247c0c90ecf4ae7a032c54fdc21b91ca274062", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-24.05", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } }, "root": { "inputs": { + "crane": "crane", "flake-utils": "flake-utils", - "flakebox": "flakebox", "nixpkgs": "nixpkgs" } - }, - "rust-analyzer-src": { - "flake": false, - "locked": { - "lastModified": 1717583671, - "narHash": "sha256-+lRAmz92CNUxorqWusgJbL9VE1eKCnQQojglRemzwkw=", - "owner": "rust-lang", - "repo": "rust-analyzer", - "rev": "48bbdd6a74f3176987d5c809894ac33957000d19", - "type": "github" - }, - "original": { - "owner": "rust-lang", - "ref": "nightly", - "repo": "rust-analyzer", - "type": "github" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "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" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 290f97e..e42f0ff 100644 --- a/flake.nix +++ b/flake.nix @@ -1,60 +1,21 @@ { - description = "CLN nostr wallet connect"; - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; - - flakebox = { - url = "github:rustshop/flakebox"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + crane.url = "github:ipetkov/crane"; + crane.inputs.nixpkgs.follows = "nixpkgs"; flake-utils.url = "github:numtide/flake-utils"; }; - outputs = { self, nixpkgs, flakebox, flake-utils }: + outputs = { self, nixpkgs, crane, flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system: let - pkgs = import nixpkgs { system = system; }; - lib = pkgs.lib; - flakeboxLib = flakebox.lib.${system} { }; - rustSrc = flakeboxLib.filterSubPaths { - root = builtins.path { - name = "cln-nostr-wallet-connect"; - path = ./.; - }; - paths = [ ]; - }; - - targetsStd = flakeboxLib.mkStdTargets { }; - toolchainsStd = flakeboxLib.mkStdToolchains { }; - - toolchainNative = flakeboxLib.mkFenixToolchain { - targets = (pkgs.lib.getAttrs [ "default" ] targetsStd); - }; - - commonArgs = { - buildInputs = [ pkgs.openssl ] ++ lib.optionals pkgs.stdenv.isDarwin - [ pkgs.darwin.apple_sdk.frameworks.SystemConfiguration ]; - nativeBuildInputs = [ pkgs.pkg-config ]; - }; - outputs = (flakeboxLib.craneMultiBuild { toolchains = toolchainsStd; }) - (craneLib': - let - craneLib = (craneLib'.overrideArgs { - pname = "flexbox-multibuild"; - src = rustSrc; - }).overrideArgs commonArgs; - in rec { - workspaceDeps = craneLib.buildWorkspaceDepsOnly { }; - workspaceBuild = - craneLib.buildWorkspace { cargoArtifacts = workspaceDeps; }; - }); - in { - devShells = flakeboxLib.mkShells { - toolchain = toolchainNative; - packages = [ ]; - nativeBuildInputs = with pkgs; [ wasm-pack sqlx-cli ]; - }; - }); + craneLib = crane.lib.${system}; + in + { + packages.default = craneLib.buildPackage { + src = craneLib.cleanCargoSource ./.; + buildInputs = []; + nativeBuildInputs = []; + }; + }); }