From a7e109574a84fc0bcf811a5cac7eefb6317d2efa Mon Sep 17 00:00:00 2001 From: Lars Jellema Date: Wed, 10 Oct 2018 14:13:50 +0200 Subject: [PATCH 1/2] Add README.md --- README.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..d89dfe7 --- /dev/null +++ b/README.md @@ -0,0 +1,35 @@ +`mix-to-nix` is a small tool for generating nix packages from `mix.lock` files. + +## Usage + +You can create an overlay, add `mix-to-nix` and use it to generate your nix +packages. + +```nix +self: super: +{ + foobar = + let + src = fetchGit { + url = https://github.com/example/foobar; + rev = "examplerev000000000000000000000000000000"; + ref = "v1.0.0"; + }; + in + self.callPackage (self.mixToNix src) {}; + + mixToNix = self.callPackage (fetchGit { + url = "https://github.com/serokell/mix-to-nix"; + rev = "examplerev000000000000000000000000000000"; + ref = "v1.0.0"; + }) {}; +} +``` + +You can also use it to manually generate a `default.nix`: + +```sh +mix deps.get +mix escript.build +./mix2nix /path/to/mix.lock /path/to/default.nix +``` From 80100395285eef7376a7d8b2b980577b4ec6e4f4 Mon Sep 17 00:00:00 2001 From: Katharina Date: Tue, 29 Jan 2019 22:26:32 +0100 Subject: [PATCH 2/2] Fixing usage CLI instructions If called the way the `README` does, the CLI fails to match the input pattern to a function. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d89dfe7..bd43904 100644 --- a/README.md +++ b/README.md @@ -31,5 +31,5 @@ You can also use it to manually generate a `default.nix`: ```sh mix deps.get mix escript.build -./mix2nix /path/to/mix.lock /path/to/default.nix +./mix2nix /path/to/mix.lock > /path/to/default.nix ```