Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9e84b4042369
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e6a0514aaf56
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Jun 16, 2019

  1. libfsm: init at 0.1pre1869_f70c3c5

    Signed-off-by: Austin Seipp <as@fastly.com>
    Austin Seipp authored and thoughtpolice committed Jun 16, 2019
    Copy the full SHA
    e6a0514 View commit details
Showing with 55 additions and 0 deletions.
  1. +53 −0 pkgs/development/libraries/libfsm/default.nix
  2. +2 −0 pkgs/top-level/all-packages.nix
53 changes: 53 additions & 0 deletions pkgs/development/libraries/libfsm/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{ stdenv, fetchFromGitHub
, bmake
}:

stdenv.mkDerivation rec {
name = "libfsm-${version}";
version = "0.1pre1869_${builtins.substring 0 7 src.rev}";

src = fetchFromGitHub {
owner = "katef";
repo = "libfsm";
rev = "f70c3c5778a79eeecb52f9fd35c7cbc241db0ed6";
sha256 = "1hgv272jdv6dwnsdjajyky537z84q0cwzspw9br46qj51h8gkwvx";
fetchSubmodules = true;
};

nativeBuildInputs = [ bmake ];
enableParallelBuilding = true;

# note: build checks value of '$CC' to add some extra cflags, but we don't
# necessarily know which 'stdenv' someone chose, so we leave it alone (e.g.
# if we use stdenv vs clangStdenv, we don't know which, and CC=cc in all
# cases.) it's unclear exactly what should be done if we want those flags,
# but the defaults work fine.
buildPhase = "PREFIX=$out bmake -r install";

# fix up multi-output install. we also have to fix the pkgconfig libdir
# file; it uses prefix=$out; libdir=${prefix}/lib, which is wrong in
# our case; libdir should really be set to the $lib output.
installPhase = ''
mkdir -p $lib $dev/lib
mv $out/lib $lib/lib
mv $out/include $dev/include
mv $out/share/pkgconfig $dev/lib/pkgconfig
rmdir $out/share
for x in libfsm.pc libre.pc; do
substituteInPlace "$dev/lib/pkgconfig/$x" \
--replace 'libdir=''${prefix}/lib' "libdir=$lib/lib"
done
'';

outputs = [ "out" "lib" "dev" ];

meta = with stdenv.lib; {
description = "DFA regular expression library & friends";
homepage = "https://github.com/katef/libfsm";
license = licenses.bsd2;
platforms = platforms.unix;
maintainers = with maintainers; [ thoughtpolice ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
@@ -4309,6 +4309,8 @@ in

libfann = callPackage ../development/libraries/libfann { };

libfsm = callPackage ../development/libraries/libfsm { };

libgaminggear = callPackage ../development/libraries/libgaminggear { };

libhandy = callPackage ../development/libraries/libhandy { };