parent
ed3698a9ba
commit
6475b87316
2 changed files with 6 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
inputs.git-hooks.url = "github:cachix/git-hooks.nix";
|
inputs.git-hooks.url = "github:cachix/git-hooks.nix";
|
||||||
inputs.git-hooks.inputs.nixpkgs.follows = "nixpkgs";
|
inputs.git-hooks.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
outputs = inputs: let
|
outputs = inputs: let
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
{pkgs, ...}: let
|
{pkgs, ...}: let
|
||||||
|
inherit (builtins) fromTOML readFile;
|
||||||
pname = "my-package";
|
pname = "my-package";
|
||||||
|
src = ./..;
|
||||||
main-package = pkgs.rustPlatform.buildRustPackage {
|
main-package = pkgs.rustPlatform.buildRustPackage {
|
||||||
inherit pname;
|
inherit pname src;
|
||||||
version = "0.1.0";
|
version = (fromTOML (readFile "${src}/Cargo.toml")).package.version;
|
||||||
|
# or for workspaces: version = (fromTOML (readFile "${src}/${pname}/Cargo.toml")).package.version;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = with pkgs; [
|
||||||
|
@ -14,8 +17,6 @@
|
||||||
];
|
];
|
||||||
*/
|
*/
|
||||||
|
|
||||||
src = ./..;
|
|
||||||
hash = pkgs.lib.fakeHash;
|
|
||||||
cargoHash = pkgs.lib.fakeHash;
|
cargoHash = pkgs.lib.fakeHash;
|
||||||
useFetchCargoVendor = true;
|
useFetchCargoVendor = true;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue