From eb4fd7e716c210684fef1e54348802b1c065a952 Mon Sep 17 00:00:00 2001 From: Brian McKenna Date: Sat, 15 Jan 2022 06:29:38 +1000 Subject: [PATCH 1/2] nsync: init at 1.24.0 --- pkgs/development/libraries/nsync/default.nix | 29 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 pkgs/development/libraries/nsync/default.nix diff --git a/pkgs/development/libraries/nsync/default.nix b/pkgs/development/libraries/nsync/default.nix new file mode 100644 index 000000000000..b0370af29851 --- /dev/null +++ b/pkgs/development/libraries/nsync/default.nix @@ -0,0 +1,29 @@ +{ stdenv +, lib +, fetchFromGitHub +, cmake +}: + +stdenv.mkDerivation rec { + pname = "nsync"; + version = "1.24.0"; + + src = fetchFromGitHub { + owner = "google"; + repo = "nsync"; + rev = version; + sha256 = "sha256-jQJtlBDR6efBe1tFOUOZ6awaMTT33qM/GbvbwiWTZxw="; + }; + + nativeBuildInputs = [ cmake ]; + + meta = { + homepage = "https://github.com/google/nsync"; + description = "C library that exports various synchronization primitives"; + license = lib.licenses.asl20; + maintainers = [ lib.maintainers.puffnfresh ]; + # On macOS we get an error for some reason: + # > mkdir: cannot create directory 'build': File exists + platforms = lib.platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1cc05eafa629..c4a54d390748 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3492,6 +3492,8 @@ with pkgs; nrsc5 = callPackage ../applications/misc/nrsc5 { }; + nsync = callPackage ../development/libraries/nsync { }; + nwipe = callPackage ../tools/security/nwipe { }; nx2elf = callPackage ../tools/compression/nx2elf { }; From 510773323bcc8eaa57f965791f0bac57cb862c96 Mon Sep 17 00:00:00 2001 From: Brian McKenna Date: Sun, 16 Jan 2022 06:56:15 +1000 Subject: [PATCH 2/2] nsync: apply suggestions from code review Co-authored-by: Nikolay Korotkiy --- pkgs/development/libraries/nsync/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/nsync/default.nix b/pkgs/development/libraries/nsync/default.nix index b0370af29851..a00893c15732 100644 --- a/pkgs/development/libraries/nsync/default.nix +++ b/pkgs/development/libraries/nsync/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "google"; - repo = "nsync"; + repo = pname; rev = version; sha256 = "sha256-jQJtlBDR6efBe1tFOUOZ6awaMTT33qM/GbvbwiWTZxw="; }; @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { homepage = "https://github.com/google/nsync"; description = "C library that exports various synchronization primitives"; license = lib.licenses.asl20; - maintainers = [ lib.maintainers.puffnfresh ]; + maintainers = with lib.maintainers; [ puffnfresh ]; # On macOS we get an error for some reason: # > mkdir: cannot create directory 'build': File exists platforms = lib.platforms.linux;