mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 20:34:52 +03:00
skalibs: new package
Skalibs is a set of general-purpose C programming libraries used for building all software at skarnet.org.
This commit is contained in:
parent
030439d8fe
commit
f0478220d8
58
pkgs/development/libraries/skalibs/default.nix
Normal file
58
pkgs/development/libraries/skalibs/default.nix
Normal file
@ -0,0 +1,58 @@
|
||||
{stdenv, fetchurl}:
|
||||
|
||||
let
|
||||
|
||||
version = "1.6.0.0";
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "skalibs-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://skarnet.org/software/skalibs/${name}.tar.gz";
|
||||
sha256 = "0jz3farll9n5jvz3g6wri99s6njkgmnf0r9jqjlg03f20dzv8c8w";
|
||||
};
|
||||
|
||||
sourceRoot = "prog/${name}";
|
||||
|
||||
# See http://skarnet.org/cgi-bin/archive.cgi?1:mss:75:201405:pkmodhckjklemogbplje
|
||||
patches = [ ./getpeereid.patch ];
|
||||
|
||||
configurePhase = ''
|
||||
pushd conf-compile
|
||||
|
||||
printf "$out/bin" > conf-defaultpath
|
||||
printf "$out/etc" > conf-etc
|
||||
printf "$out/bin" > conf-install-command
|
||||
printf "$out/include" > conf-install-include
|
||||
printf "$out/libexec" > conf-install-libexec
|
||||
printf "$out/lib" > conf-install-library
|
||||
printf "$out/lib" > conf-install-library.so
|
||||
printf "$out/sysdeps" > conf-install-sysdeps
|
||||
|
||||
# let nix builder strip things, cross-platform
|
||||
truncate --size 0 conf-stripbins
|
||||
truncate --size 0 conf-striplibs
|
||||
|
||||
rm -f flag-slashpackage
|
||||
touch flag-allstatic
|
||||
touch flag-forcedevr
|
||||
|
||||
popd
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
patchShebangs src/sys
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
mkdir -p "$out/etc"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://skarnet.org/software/skalibs/;
|
||||
description = "A set of general-purpose C programming libraries.";
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
license = stdenv.lib.licenses.isc;
|
||||
};
|
||||
|
||||
}
|
28
pkgs/development/libraries/skalibs/getpeereid.patch
Normal file
28
pkgs/development/libraries/skalibs/getpeereid.patch
Normal file
@ -0,0 +1,28 @@
|
||||
--- a/src/libstddjb/getpeereid.h
|
||||
+++ b/src/libstddjb/getpeereid.h
|
||||
@@ -3,6 +3,14 @@
|
||||
#ifndef GETPEEREID_H
|
||||
#define GETPEEREID_H
|
||||
|
||||
+#include "sysdeps.h"
|
||||
+
|
||||
+#ifdef HASGETPEEREID
|
||||
+/* syscall exists - do nothing */
|
||||
+
|
||||
+#else
|
||||
+
|
||||
extern int getpeereid (int, int *, int *) ;
|
||||
|
||||
#endif
|
||||
+#endif
|
||||
--- a/src/libstddjb/ipc_eid.c
|
||||
+++ b/src/libstddjb/ipc_eid.c
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
int ipc_eid (int s, unsigned int *u, unsigned int *g)
|
||||
{
|
||||
- int dummyu, dummyg ;
|
||||
+ unsigned int dummyu, dummyg ;
|
||||
if (getpeereid(s, &dummyu, &dummyg) < 0) return -1 ;
|
||||
*u = (unsigned int)dummyu ;
|
||||
*g = (unsigned int)dummyg ;
|
@ -6169,6 +6169,8 @@ let
|
||||
|
||||
sfml_git = callPackage ../development/libraries/sfml { };
|
||||
|
||||
skalibs = callPackage ../development/libraries/skalibs { };
|
||||
|
||||
slang = callPackage ../development/libraries/slang { };
|
||||
|
||||
slibGuile = callPackage ../development/libraries/slib {
|
||||
|
Loading…
Reference in New Issue
Block a user