Hello there, everyone.
I am pretty new to the Nix ecosystem, and I have run into an issue.
I am trying to create a Nix package of a program I wrote for myself to keep track of finances in Rust, and I have successfully got it to build all the way to the point where it produces a binary.
However, this program relies on the presence of a schema file that creates an SQLite database, and I cannot get Nix to export both the binary and the sql file.
In the project’s Makefile, I have it set so that it will copy the binary and the SQL file to predetermined locations, which is defined by default to be /usr/local, during the install process.
The schema file is expected to be at /usr/local/share//
From what I could see from searching, I expect to see a folder called share in the output folder, since the binary ends up in result/bin, and the documentations says that there are usually doc and man folders that correspond to locations in
/usr/local.
The nix files are being currently run on a NixOS VM.
The contents of the nix file for the program are as follows:
{
lib,
libc,
fetchFromGitHub,
rustPlatform,
llvmPackages,
stdenv,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = “rcheckbook”;
version = “0.6.4”;
src = fetchFromGitHub {
owner = "bryceac";
repo = "rcheckbook";
rev = "v0.6.4";
sha256 = "0wkad5l5lzm9sqhvmi95ibxhrv03v0750vwpjwmf92qsb29wjnay";
};
cargoHash = "sha256-bYSZpmG1/myX7EzB1qdjZjQX46J6XoLLTqPfWGKxG30=";
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
nativeBuildInputs = [ rustPlatform.bindgenHook ];
meta = {
description = "Simple CLI-based Checkbook ledger.";
homepage = "https://github.com/bryceac/rcheckbook";
license = lib.licenses.mit;
maintainers = [];
};
})
So far, I have tried looking up how to deal with the InstallPhase, but I cannot seem to figure out how to access the repo source.
Does anyone have any ideas of how to resolve this?