diff options
Diffstat (limited to 'pkgs/development/tools/misc')
-rw-r--r-- | pkgs/development/tools/misc/patchelf/unstable.nix | 6 | ||||
-rw-r--r-- | pkgs/development/tools/misc/sloccount/default.nix | 10 | ||||
-rw-r--r-- | pkgs/development/tools/misc/tokei/default.nix | 6 | ||||
-rw-r--r-- | pkgs/development/tools/misc/whatstyle/default.nix | 30 |
4 files changed, 46 insertions, 6 deletions
diff --git a/pkgs/development/tools/misc/patchelf/unstable.nix b/pkgs/development/tools/misc/patchelf/unstable.nix index 0c5ec640426..29d713a9af4 100644 --- a/pkgs/development/tools/misc/patchelf/unstable.nix +++ b/pkgs/development/tools/misc/patchelf/unstable.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "patchelf-${version}"; - version = "0.10-pre-20180509"; + version = "0.10-pre-20190328"; src = fetchFromGitHub { owner = "NixOS"; repo = "patchelf"; - rev = "27ffe8ae871e7a186018d66020ef3f6162c12c69"; - sha256 = "1sfkqsvwqqm2kdgkiddrxni86ilbrdw5my29szz81nj1m2j16asr"; + rev = "e1e39f3639e39360ceebb2f7ed533cede4623070"; + sha256 = "09q1b1yqfzg1ih51v7qjh55vxfdbd8x5anycl8sfz6qy107wr02k"; }; # Drop test that fails on musl (?) diff --git a/pkgs/development/tools/misc/sloccount/default.nix b/pkgs/development/tools/misc/sloccount/default.nix index 28500ee08ee..965f0ed096c 100644 --- a/pkgs/development/tools/misc/sloccount/default.nix +++ b/pkgs/development/tools/misc/sloccount/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, stdenv, perl }: +{ fetchurl, stdenv, perl, makeWrapper }: stdenv.mkDerivation rec { name = "sloccount-2.26"; @@ -8,6 +8,7 @@ stdenv.mkDerivation rec { sha256 = "0ayiwfjdh1946asah861ah9269s5xkc8p5fv1wnxs9znyaxs4zzs"; }; + nativeBuildInputs = [ makeWrapper ]; buildInputs = [ perl ]; # Make sure the Flex-generated files are newer than the `.l' files, so that @@ -40,6 +41,13 @@ stdenv.mkDerivation rec { mkdir -p "$out/share/doc" ''; + postInstall = '' + for w in "$out/bin"/*; do + isScript "$w" || continue + wrapProgram "$w" --prefix PATH : "$out/bin" + done + ''; + meta = { description = "Set of tools for counting physical Source Lines of Code (SLOC)"; diff --git a/pkgs/development/tools/misc/tokei/default.nix b/pkgs/development/tools/misc/tokei/default.nix index f9b4343a63a..de60d91bf83 100644 --- a/pkgs/development/tools/misc/tokei/default.nix +++ b/pkgs/development/tools/misc/tokei/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, rustPlatform, libiconv }: +{ stdenv, fetchFromGitHub, rustPlatform, libiconv, darwin }: rustPlatform.buildRustPackage rec { pname = "tokei"; @@ -13,7 +13,9 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "1xai3jxvs8r3s3v5d5w40miw6nihnj9gzlzzdrwphmgrkywr88c4"; - buildInputs = [ libiconv ]; + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ + libiconv darwin.apple_sdk.frameworks.Security + ]; meta = with stdenv.lib; { description = "Program that displays statistics about your code"; diff --git a/pkgs/development/tools/misc/whatstyle/default.nix b/pkgs/development/tools/misc/whatstyle/default.nix new file mode 100644 index 00000000000..0c6e4f568ff --- /dev/null +++ b/pkgs/development/tools/misc/whatstyle/default.nix @@ -0,0 +1,30 @@ +{ stdenv, python3, fetchFromGitHub, clang-unwrapped }: + +python3.pkgs.buildPythonApplication rec { + pname = "whatstyle"; + version = "0.1.7"; + src = fetchFromGitHub { + owner = "mikr"; + repo = pname; + rev = "v${version}"; + sha256 = "16ak4g149cr764c1lqakiyzmf5s98w8bdc4gk69m8qacimfg3mzm"; + }; + + # Fix references to previous version, to avoid confusion: + postPatch = '' + substituteInPlace setup.py --replace 0.1.6 ${version} + substituteInPlace ${pname}.py --replace 0.1.6 ${version} + ''; + + checkInputs = [ clang-unwrapped /* clang-format */ ]; + + doCheck = false; # 3 or 4 failures depending on version, haven't investigated. + + meta = with stdenv.lib; { + description = "Find a code format style that fits given source files"; + homepage = https://github.com/mikr/whatstyle; + license = licenses.mit; + maintainers = with maintainers; [ dtzWill ]; + platforms = platforms.all; + }; +} |