Skip to content

Commit

Permalink
bitscope: refactored to pass nixpkgs-lint
Browse files Browse the repository at this point in the history
The linter (nixpkgs-lint) was not able to find the bitscope packages
because `recurseIntoAttrs` was not applied to the suite's set.

The name supplied to `buildFHSUserEnv` produces a binary that
corresponds to the binary names in the deb packages (e.g.: bitscope-dso,
bitscope-chart, bitscope-logic, etc), however; this name does not
constitute a valid nixpkgs name. Valid nixpkgs names satisfy the
`/(.*)(-[0-9].*)$/` pattern, therefore a valid name is merged into the
derivation produced by `buildFHSUserEnv`.
  • Loading branch information
vidbina authored and bjornfor committed Jan 14, 2018
1 parent 3538492 commit b986078
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
9 changes: 6 additions & 3 deletions pkgs/applications/science/electronics/bitscope/common.nix
Expand Up @@ -9,7 +9,7 @@
, makeWrapper
, pango
, stdenv
, writeScriptBin
, writeTextFile
, xorg
}:

Expand Down Expand Up @@ -60,8 +60,11 @@ let
${(wrapBinary libs) attrs.toolName}
'';
});
fhs = target: buildFHSUserEnv {
inherit (pkg) name;
runScript = target;
};
in buildFHSUserEnv {
name = attrs.toolName;
meta = pkg.meta;
runScript = "${pkg.outPath}/bin/${attrs.toolName}";
}
} // { inherit (pkg) meta name; }
Expand Up @@ -88,7 +88,7 @@ in {

meta = {
description = "Mixed signal logic timing and serial protocol analysis software for BitScope";
home = "http://bitscope.com/software/logic/";
homepage = "http://bitscope.com/software/logic/";
};

src = fetchurl {
Expand Down
3 changes: 2 additions & 1 deletion pkgs/top-level/all-packages.nix
Expand Up @@ -14262,7 +14262,8 @@ with pkgs;

bitmeter = callPackage ../applications/audio/bitmeter { };

bitscope = callPackage ../applications/science/electronics/bitscope/packages.nix { };
bitscope = recurseIntoAttrs
(callPackage ../applications/science/electronics/bitscope/packages.nix { });

bitwig-studio1 = callPackage ../applications/audio/bitwig-studio/bitwig-studio1.nix {
inherit (gnome2) zenity;
Expand Down

0 comments on commit b986078

Please sign in to comment.