~jb55/ratio

4eb820fb362c554baa73e244dae29aa62ec2d9d5 — William Casarin 5 months ago bacdb17
nix: build fixes
4 files changed, 24 insertions(+), 0 deletions(-)

A .envrc
M .gitignore
A default.nix
A shell.nix
A .envrc => .envrc +1 -0
@@ 0,0 1,1 @@
use nix

M .gitignore => .gitignore +1 -0
@@ 2,3 2,4 @@
*.tab.*
/lex.yy.c
/ratio
/result

A default.nix => default.nix +20 -0
@@ 0,0 1,20 @@
{ stdenv, gmp, bison, flex }:

stdenv.mkDerivation rec {
  name = "ratio-${version}";
  version = "0.1";

  src = ./.;

  makeFlags = "PREFIX=$(out)";

  nativeBuildInputs = [ bison flex ];
  buildInputs = [ gmp ];

  meta = with stdenv.lib; {
    description = "ratio calculator";
    homepage = "https://github.com/jb55/ratio";
    maintainers = with maintainers; [ jb55 ];
    license = licenses.mit;
  };
}

A shell.nix => shell.nix +2 -0
@@ 0,0 1,2 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.callPackage ./. {}