Browse Source

Add package flake

tags/v0.3.7rc0
Ben-PH 1 year ago
parent
commit
2ae712ab9d
1 changed files with 54 additions and 0 deletions
  1. +54
    -0
      flake.nix

+ 54
- 0
flake.nix View File

@@ -0,0 +1,54 @@
{
description = "Dora CLI package for Nix";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = {
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {inherit system;};
in {
packages = {
dora-cli = pkgs.rustPlatform.buildRustPackage rec {
pname = "dora-cli";
version = "0.3.6";

src = pkgs.fetchFromGitHub {
owner = "dora-rs";
repo = "dora";
rev = "v${version}";
hash = "sha256-YwEqwA7Eqz7ZJYFfKoPTWkmgsudKpoATcFE6OOwxpbU=";
};

cargoHash = "sha256-AkungKYGHMK/tUfzh0d88zRRkQfshus7xOHzdtYAT/I=";
nativeBuildInputs = [pkgs.pkg-config];
buildInputs = [pkgs.openssl];
OPENSSL_NO_VENDOR = 1;
buildPhase = ''
cargo build --release -p dora-cli
'';


installPhase = ''
mkdir -p $out/bin
cp target/release/dora $out/bin
'';

doCheck = false;

meta = {
description = "Making robotic applications fast and simple!";
homepage = "https://dora-rs.ai/";
changelog = "https://github.com/dora-rs/dora/blob/main/Changelog.md";
license = pkgs.lib.licenses.asl20;
};
};
};
});
}

Loading…
Cancel
Save