Commit 31bfe498 authored by Sigmanificient's avatar Sigmanificient
Browse files

ustr: migrate to by-name

parent 413c50ac
Loading
Loading
Loading
Loading
+16 −8
Original line number Diff line number Diff line
{ lib, stdenv, fetchgit }:
{
  lib,
  stdenv,
  fetchgit,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "ustr";
@@ -18,16 +22,20 @@ stdenv.mkDerivation (finalAttrs: {

  # Fix detection of stdint.h
  postPatch = ''
    sed -i 's,\(have_stdint_h\)=0,\1=1,g' Makefile
    sed -i 's,\(USTR_CONF_HAVE_STDINT_H\) 0,\1 1,g' ustr-import.in
  '';
    substituteInPlace Makefile \
      --replace-fail "have_stdint_h=0" "have_stdint_h=1"

  preBuild = ''
    makeFlagsArray+=("prefix=$out")
    makeFlagsArray+=("LDCONFIG=echo")
    makeFlagsArray+=("HIDE=")
    cat ustr-import.in | grep USTR_CONF
    substituteInPlace ustr-import.in \
      --replace-fail "USTR_CONF_HAVE_STDINT_H 0" "USTR_CONF_HAVE_STDINT_H 1"
  '';

  makeFlags = [
    "prefix=${placeholder "out"}"
    "LDCONFIG=echo"
    "HIDE="
  ];

  # Remove debug libraries
  postInstall = ''
    find $out/lib -name \*debug\* -delete
+0 −2
Original line number Diff line number Diff line
@@ -24804,8 +24804,6 @@ with pkgs;
  unixODBCDrivers = recurseIntoAttrs (callPackages ../development/libraries/unixODBCDrivers { });
  ustr = callPackage ../development/libraries/ustr { };
  usrsctp = callPackage ../development/libraries/usrsctp { };
  usbredir = callPackage ../development/libraries/usbredir { };