nixpkgs/pkgs/by-name/na/nanomsg/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

38 lines
1.0 KiB
Nix

{ lib, stdenv, cmake, fetchFromGitHub, fetchpatch }:
stdenv.mkDerivation rec {
version = "1.1.5";
pname = "nanomsg";
src = fetchFromGitHub {
owner = "nanomsg";
repo = "nanomsg";
rev = version;
sha256 = "01ddfzjlkf2dgijrmm3j3j8irccsnbgfvjcnwslsfaxnrmrq5s64";
};
patches = [
# Add pkgconfig fix from https://github.com/nanomsg/nanomsg/pull/1085
(fetchpatch {
url = "https://github.com/nanomsg/nanomsg/commit/e3323f19579529d272cb1d55bd6b653c4f34c064.patch";
sha256 = "URz7TAqqpKxqjgvQqNX4WNSShwiEzAvO2h0hCZ2NhVY=";
})
];
nativeBuildInputs = [ cmake ];
# https://github.com/nanomsg/nanomsg/issues/1082
postPatch = ''
substituteInPlace src/pkgconfig.in \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
'';
meta = with lib; {
description= "Socket library that provides several common communication patterns";
homepage = "https://nanomsg.org/";
license = licenses.mit;
mainProgram = "nanocat";
platforms = platforms.unix;
};
}