about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Asabina <vid@bina.me>2017-12-28 17:50:46 +0100
committerBjørn Forsman <bjorn.forsman@gmail.com>2017-12-30 21:58:27 +0100
commit810ec3f8bd573f437c850935de707c4025cb57db (patch)
tree2b05f5ac72aca2eb11be8198c8a4f0b6564682f2
parent8dbfe6990eb4be4a3ff224630d070df4c83bf78a (diff)
downloadnixlib-810ec3f8bd573f437c850935de707c4025cb57db.tar
nixlib-810ec3f8bd573f437c850935de707c4025cb57db.tar.gz
nixlib-810ec3f8bd573f437c850935de707c4025cb57db.tar.bz2
nixlib-810ec3f8bd573f437c850935de707c4025cb57db.tar.lz
nixlib-810ec3f8bd573f437c850935de707c4025cb57db.tar.xz
nixlib-810ec3f8bd573f437c850935de707c4025cb57db.tar.zst
nixlib-810ec3f8bd573f437c850935de707c4025cb57db.zip
bitscope: init at 2017-12-28
-rw-r--r--pkgs/applications/science/electronics/bitscope/common.nix67
-rw-r--r--pkgs/applications/science/electronics/bitscope/packages.nix153
-rw-r--r--pkgs/top-level/all-packages.nix2
3 files changed, 222 insertions, 0 deletions
diff --git a/pkgs/applications/science/electronics/bitscope/common.nix b/pkgs/applications/science/electronics/bitscope/common.nix
new file mode 100644
index 000000000000..b93b68458f9a
--- /dev/null
+++ b/pkgs/applications/science/electronics/bitscope/common.nix
@@ -0,0 +1,67 @@
+{ atk
+, buildFHSUserEnv
+, cairo
+, dpkg
+, fetchurl
+, gdk_pixbuf
+, glib
+, gtk2-x11
+, makeWrapper
+, pango
+, stdenv
+, writeScriptBin
+, xorg
+}:
+
+{ src, toolName, version, ... } @ attrs:
+let
+  wrapBinary = libPaths: binaryName: ''
+    wrapProgram "$out/bin/${binaryName}" \
+      --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath libPaths}"
+  '';
+  pkg = stdenv.mkDerivation (rec {
+    inherit (attrs) version src;
+
+    name = "${toolName}-${version}";
+
+    meta = with stdenv.lib; {
+      homepage = http://bitscope.com/software/;
+      license = licenses.unfree;
+      platforms = [ "x86_64-linux" ];
+      maintainers = with maintainers; [
+        vidbina
+      ];
+    } // (attrs.meta or {});
+
+    buildInputs = [
+      dpkg
+      makeWrapper
+    ];
+
+    libs = attrs.libs or [
+      atk
+      cairo
+      gdk_pixbuf
+      glib
+      gtk2-x11
+      pango
+      xorg.libX11
+    ];
+
+    dontBuild = true;
+
+    unpackPhase = attrs.unpackPhase or ''
+      dpkg-deb -x ${attrs.src} ./
+    '';
+
+    installPhase = attrs.installPhase or ''
+      mkdir -p "$out/bin"
+      cp -a usr/* "$out/"
+      ${(wrapBinary libs) attrs.toolName}
+    '';
+  });
+in buildFHSUserEnv {
+  name = attrs.toolName;
+  meta = pkg.meta;
+  runScript = "${pkg.outPath}/bin/${attrs.toolName}";
+}
diff --git a/pkgs/applications/science/electronics/bitscope/packages.nix b/pkgs/applications/science/electronics/bitscope/packages.nix
new file mode 100644
index 000000000000..bb7710bf82eb
--- /dev/null
+++ b/pkgs/applications/science/electronics/bitscope/packages.nix
@@ -0,0 +1,153 @@
+{ buildFHSUserEnv
+, callPackage
+, fetchurl
+, makeWrapper
+, stdenv
+}:
+
+let
+  wrapBinary = libPaths: binaryName: ''
+    wrapProgram "$out/bin/${binaryName}" \
+      --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath libPaths}"
+  '';
+  mkBitscope = callPackage (import ./common.nix) { };
+in {
+  chart = let
+    toolName = "bitscope-chart";
+    version = "2.0.FK22M";
+  in mkBitscope {
+    inherit toolName version;
+
+    meta = {
+      description = "Multi-channel waveform data acquisition and chart recording application";
+      homepage = "http://bitscope.com/software/chart/";
+    };
+
+    src = fetchurl {
+      url = "http://bitscope.com/download/files/${toolName}_${version}_amd64.deb";
+      sha256 = "08mc82pjamyyyhh15sagsv0sc7yx5v5n54bg60fpj7v41wdwrzxw";
+    };
+  };
+
+  console = let
+    toolName = "bitscope-console";
+    version = "1.0.FK29A";
+  in mkBitscope {
+    # NOTE: this is meant as a demo by BitScope
+    inherit toolName version;
+
+    meta = {
+      description = "Demonstrative communications program designed to make it easy to talk to any model BitScope";
+    };
+
+    src = fetchurl {
+      url = "http://bitscope.com/download/files/${toolName}_${version}_amd64.deb";
+      sha256 = "00b4gxwz7w6pmfrcz14326b24kl44hp0gzzqcqxwi5vws3f0y49d";
+    };
+  };
+
+  display = let
+    toolName = "bitscope-display";
+    version = "1.0.EC17A";
+  in mkBitscope {
+    inherit toolName version;
+
+    meta = {
+      description = "Display diagnostic application for BitScope";
+      homepage = "http://bitscope.com/software/display/";
+    };
+
+    src = fetchurl {
+      url = "http://bitscope.com/download/files/${toolName}_${version}_amd64.deb";
+      sha256 = "05xr5mnka1v3ibcasg74kmj6nlv1nmn3lca1wv77whkq85cmz0s1";
+    };
+  };
+
+  dso = let
+    toolName = "bitscope-dso";
+    version = "2.8.FE22H";
+  in mkBitscope {
+    inherit toolName version;
+
+    meta = {
+      description = "Test and measurement software for BitScope";
+      homepage = "http://bitscope.com/software/dso/";
+    };
+
+    src = fetchurl {
+      url = "http://bitscope.com/download/files/${toolName}_${version}_amd64.deb";
+      sha256 = "0fc6crfkprj78dxxhvhbn1dx1db5chm0cpwlqpqv8sz6whp12mcj";
+    };
+  };
+
+  logic = let
+    toolName = "bitscope-logic";
+    version = "1.2.FC20C";
+  in mkBitscope {
+    inherit toolName version;
+
+    meta = {
+      description = "Mixed signal logic timing and serial protocol analysis software for BitScope";
+      home = "http://bitscope.com/software/logic/";
+    };
+
+    src = fetchurl {
+      url = "http://bitscope.com/download/files/${toolName}_${version}_amd64.deb";
+      sha256 = "0lkb7z9gfkiyxdwh4dq1zxfls8gzdw0na1vrrbgnxfg3klv4xns3";
+    };
+  };
+
+  meter = let
+    toolName = "bitscope-meter";
+    version = "2.0.FK22G";
+  in mkBitscope {
+    inherit toolName version;
+
+    meta = {
+      description = "Automated oscilloscope, voltmeter and frequency meter for BitScope";
+      homepage = "http://bitscope.com/software/logic/";
+    };
+
+    src = fetchurl {
+      url = "http://bitscope.com/download/files/${toolName}_${version}_amd64.deb";
+      sha256 = "0nirbci6ymhk4h4bck2s4wbsl5r9yndk2jvvv72zwkg21248mnbp";
+    };
+  };
+
+  proto = let
+    toolName = "bitscope-proto";
+    version = "0.9.FG13B";
+  in mkBitscope rec {
+    inherit toolName version;
+    # NOTE: this is meant as a demo by BitScope
+    # NOTE: clicking on logo produces error
+    # TApplication.HandleException Executable not found: "http://bitscope.com/blog/DK/?p=DK15A"
+
+    meta = {
+      description = "Demonstrative prototype oscilloscope built using the BitScope Library";
+      homepage = "http://bitscope.com/blog/DK/?p=DK15A";
+    };
+
+    src = fetchurl {
+      url = "http://bitscope.com/download/files/${toolName}_${version}_amd64.deb";
+      sha256 = "1ybjfbh3narn29ll4nci4b7rnxy0hj3wdfm4v8c6pjr8pfvv9spy";
+    };
+  };
+
+  server = let
+    toolName = "bitscope-server";
+    version = "1.0.FK26A";
+  in mkBitscope {
+    inherit toolName version;
+
+    meta = {
+      description = "Remote access server solution for any BitScope";
+      homepage = "http://bitscope.com/software/server/";
+    };
+
+    src = fetchurl {
+      url = "http://bitscope.com/download/files/${toolName}_${version}_amd64.deb";
+      sha256 = "1079n7msq6ks0n4aasx40rd4q99w8j9hcsaci71nd2im2jvjpw9a";
+    };
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 482d8940c875..ad4536dbff53 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -14165,6 +14165,8 @@ with pkgs;
 
   bitmeter = callPackage ../applications/audio/bitmeter { };
 
+  bitscope = callPackage ../applications/science/electronics/bitscope/packages.nix { };
+
   bitwig-studio =  callPackage ../applications/audio/bitwig-studio {
     inherit (gnome2) zenity;
   };