Skip to content

bandithedoge/nimble2nix

Repository files navigation

Painless Nimble dependencies in Nix derivations

Usage

Install and run nimble2nix in your Nimble package's directory:

nix-env -iA nixpkgs.fetchgit --arg url "https://github.com/bandithedoge/nimble2nix"
nimble2nix .

This will generate a nimble2nix.json file. Create a nix expression that imports this repo's overlay and calls buildNimblePackage:

let
  pkgs = import <nixpkgs> {
    overlays = [
      ((builtins.fetchGit {
        url = "https://github.com/bandithedoge/nimble2nix";
      }) + "/overlay.nix")
    ];
  };
in pkgs.buildNimblePackage {
  pname = "my_package";
  version = "0.1";
  src = ./.;
}

This is only the bare minimum required to build a package. See example_package/flake.nix for a working example.

TODO

  • Development shells
  • Build phase customization
  • Package overrides

About

Painless Nimble dependencies in Nix derivations

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published