mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2025-11-05 11:56:37 +00:00
This is not a full (i.e. isolated, reproducible) Nix build, but does verify that the Nix devShell in `flake.nix` works and that we can successfully build Sparrow with Gradle and JDK provided by Nix.
36 lines
1.1 KiB
Nix
36 lines
1.1 KiB
Nix
{
|
|
description = "Sparrow Wallet Nix Flake (Development Shell only, for now)";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
flake-parts = {
|
|
url = "github:hercules-ci/flake-parts";
|
|
inputs.nixpkgs-lib.follows = "nixpkgs";
|
|
};
|
|
|
|
devshell = {
|
|
url = "github:numtide/devshell";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = inputs @ { flake-parts, devshell, ... }:
|
|
flake-parts.lib.mkFlake {inherit inputs;} {
|
|
systems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
|
|
|
|
perSystem = { config, self', inputs', pkgs, system, lib, ... }: let
|
|
inherit (pkgs) stdenv;
|
|
in {
|
|
# define default devshell
|
|
devShells.default = pkgs.mkShell {
|
|
packages = with pkgs ; [
|
|
jdk23 # This JDK will be in PATH
|
|
(gradle.override { # Gradle 8.x (Nix package) runs using an internally-linked JDK
|
|
java = jdk23; # Run Gradle with this JDK
|
|
})
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|