Skip to content

Commit

Permalink
chore: old flake
Browse files Browse the repository at this point in the history
  • Loading branch information
thesimplekid committed Jul 15, 2024
1 parent e0f0152 commit b469ab1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 275 deletions.
231 changes: 8 additions & 223 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

65 changes: 13 additions & 52 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -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 = [];
};
});
}

0 comments on commit b469ab1

Please sign in to comment.