mirror of
https://github.com/versia-pub/activitypub.git
synced 2025-12-06 06:38:20 +01:00
[feat] use naersk to build package in flake
This commit is contained in:
parent
6ec80a7d6d
commit
e239863cdb
|
|
@ -5,6 +5,8 @@
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
systems.url = "github:nix-systems/default";
|
systems.url = "github:nix-systems/default";
|
||||||
|
|
||||||
|
naersk.url = "github:nix-community/naersk";
|
||||||
|
|
||||||
# Dev tools
|
# Dev tools
|
||||||
treefmt-nix.url = "github:numtide/treefmt-nix";
|
treefmt-nix.url = "github:numtide/treefmt-nix";
|
||||||
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
|
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
@ -23,6 +25,7 @@
|
||||||
libiconv
|
libiconv
|
||||||
openssl
|
openssl
|
||||||
];
|
];
|
||||||
|
naersk' = pkgs.callPackage naersk {};
|
||||||
rust-toolchain = pkgs.symlinkJoin {
|
rust-toolchain = pkgs.symlinkJoin {
|
||||||
name = "rust-toolchain";
|
name = "rust-toolchain";
|
||||||
paths = [ pkgs.rustc pkgs.cargo pkgs.cargo-watch pkgs.rust-analyzer pkgs.rustPlatform.rustcSrc ];
|
paths = [ pkgs.rustc pkgs.cargo pkgs.cargo-watch pkgs.rust-analyzer pkgs.rustPlatform.rustcSrc ];
|
||||||
|
|
@ -33,10 +36,9 @@
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# Rust package
|
# Rust package
|
||||||
packages.default = pkgs.rustPlatform.buildRustPackage {
|
packages.default = naersk'.buildPackage {
|
||||||
inherit (cargoToml.package) name version;
|
inherit (cargoToml.package) name version;
|
||||||
src = ./.;
|
src = ./.;
|
||||||
cargoLock.lockFile = ./Cargo.lock;
|
|
||||||
buildInputs = nonRustDeps;
|
buildInputs = nonRustDeps;
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = with pkgs; [
|
||||||
rust-toolchain
|
rust-toolchain
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue