Skip to content

Commit f37d97b

Browse files
committed
libbacktrace: clean up
- Prefix version with “unstable-” as per contributing guide - Do not use rec pointlessly - Use `lib.enableFeature` - Add update script - Format the expression - Remove unused callPackage input
1 parent b1f87ca commit f37d97b

1 file changed

Lines changed: 17 additions & 8 deletions

File tree

pkgs/development/libraries/libbacktrace/default.nix

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,31 @@
1-
{ lib, stdenv, callPackage, fetchFromGitHub
1+
{ stdenv
2+
, lib
3+
, fetchFromGitHub
24
, enableStatic ? stdenv.hostPlatform.isStatic
35
, enableShared ? !stdenv.hostPlatform.isStatic
6+
, unstableGitUpdater
47
}:
5-
let
6-
yesno = b: if b then "yes" else "no";
7-
in stdenv.mkDerivation rec {
8+
9+
stdenv.mkDerivation {
810
pname = "libbacktrace";
9-
version = "2020-05-13";
11+
version = "unstable-2020-05-13";
12+
1013
src = fetchFromGitHub {
1114
owner = "ianlancetaylor";
12-
repo = pname;
15+
repo = "libbacktrace";
1316
rev = "9b7f216e867916594d81e8b6118f092ac3fcf704";
1417
sha256 = "0qr624v954gnfkmpdlfk66sxz3acyfmv805rybsaggw5gz5sd1nh";
1518
};
19+
1620
configureFlags = [
17-
"--enable-static=${yesno enableStatic}"
18-
"--enable-shared=${yesno enableShared}"
21+
(lib.enableFeature enableStatic "static")
22+
(lib.enableFeature enableShared "shared")
1923
];
24+
25+
passthru = {
26+
updateScript = unstableGitUpdater { };
27+
};
28+
2029
meta = with lib; {
2130
description = "A C library that may be linked into a C/C++ program to produce symbolic backtraces";
2231
homepage = "https://github.com/ianlancetaylor/libbacktrace";

0 commit comments

Comments
 (0)