diff --git a/pkgs/applications/audio/ptcollab/default.nix b/pkgs/applications/audio/ptcollab/default.nix index 36495986201..f5752dd96f4 100644 --- a/pkgs/applications/audio/ptcollab/default.nix +++ b/pkgs/applications/audio/ptcollab/default.nix @@ -1,26 +1,40 @@ { mkDerivation -, lib, stdenv +, lib +, stdenv , fetchFromGitHub +, nix-update-script , qmake , qtbase , qtmultimedia , libvorbis +, rtmidi }: mkDerivation rec { pname = "ptcollab"; - version = "0.3.5.1"; + version = "0.4.0"; src = fetchFromGitHub { owner = "yuxshao"; repo = "ptcollab"; rev = "v${version}"; - sha256 = "1ahfxjm1chz8k65rs7rgn4s2bgippq58fjcxl8fr21pzn718wqf1"; + sha256 = "1yfnf47saxxj17x0vyxihr343kp7gz3fashzky79j80sqlm6ng85"; }; + postPatch = '' + substituteInPlace src/editor.pro \ + --replace '/usr/include/rtmidi' '${rtmidi}/include/rtmidi' + ''; + nativeBuildInputs = [ qmake ]; - buildInputs = [ qtbase qtmultimedia libvorbis ]; + buildInputs = [ qtbase qtmultimedia libvorbis rtmidi ]; + + passthru = { + updateScript = nix-update-script { + attrPath = pname; + }; + }; meta = with lib; { description = "Experimental pxtone editor where you can collaborate with friends"; diff --git a/pkgs/applications/networking/flexget/default.nix b/pkgs/applications/networking/flexget/default.nix index fd68dfc49f4..3f2e3490955 100644 --- a/pkgs/applications/networking/flexget/default.nix +++ b/pkgs/applications/networking/flexget/default.nix @@ -2,11 +2,11 @@ python3Packages.buildPythonApplication rec { pname = "FlexGet"; - version = "3.1.106"; + version = "3.1.110"; src = python3Packages.fetchPypi { inherit pname version; - sha256 = "f0ff300a1762d701b77eb16142dcc13d9d099bbed695f1e950392c1d1bb988eb"; + sha256 = "e8642dcbbfe941e2d2def7bf2e28889082a78c1d041edb33dae180036832a96b"; }; postPatch = '' diff --git a/pkgs/development/compilers/ghdl/default.nix b/pkgs/development/compilers/ghdl/default.nix index e7332439439..ec07331dc52 100644 --- a/pkgs/development/compilers/ghdl/default.nix +++ b/pkgs/development/compilers/ghdl/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, gnat, zlib, llvm, lib +{ stdenv, fetchFromGitHub, callPackage, gnat, zlib, llvm, lib , backend ? "mcode" }: assert backend == "mcode" || backend == "llvm"; @@ -17,6 +17,7 @@ stdenv.mkDerivation rec { LIBRARY_PATH = "${stdenv.cc.libc}/lib"; buildInputs = [ gnat zlib ] ++ lib.optional (backend == "llvm") [ llvm ]; + propagatedBuildInputs = lib.optionals (backend == "llvm") [ zlib ]; preConfigure = '' # If llvm 7.0 works, 7.x releases should work too. @@ -30,6 +31,15 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + passthru = { + # run with either of + # nix-build -A ghdl-mcode.passthru.tests + # nix-build -A ghdl-llvm.passthru.tests + tests = { + simple = callPackage ./test-simple.nix { inherit backend; }; + }; + }; + meta = with lib; { homepage = "https://github.com/ghdl/ghdl"; description = "VHDL 2008/93/87 simulator"; diff --git a/pkgs/development/compilers/ghdl/expected-output.txt b/pkgs/development/compilers/ghdl/expected-output.txt new file mode 100644 index 00000000000..0396b0c2787 --- /dev/null +++ b/pkgs/development/compilers/ghdl/expected-output.txt @@ -0,0 +1,8 @@ +simple-tb.vhd:71:5:@700ms:(report note): 32 +simple-tb.vhd:71:5:@900ms:(report note): 78 +simple-tb.vhd:71:5:@1100ms:(report note): 105 +simple-tb.vhd:71:5:@1300ms:(report note): 120 +simple-tb.vhd:71:5:@1500ms:(report note): 79 +simple-tb.vhd:71:5:@1700ms:(report note): 83 +simple-tb.vhd:71:5:@1900ms:(report note): 32 +simple-tb.vhd:75:1:@2100ms:(report note): All tests passed. diff --git a/pkgs/development/compilers/ghdl/simple-tb.vhd b/pkgs/development/compilers/ghdl/simple-tb.vhd new file mode 100644 index 00000000000..65e4d0967c5 --- /dev/null +++ b/pkgs/development/compilers/ghdl/simple-tb.vhd @@ -0,0 +1,78 @@ +library ieee; +use IEEE.STD_LOGIC_1164.all; +use ieee.numeric_std.all; + +library STD; +use STD.textio.all; + +entity tb is +end tb; + +architecture beh of tb is + +component simple +port ( + CLK, RESET : in std_ulogic; + DATA_OUT : out std_ulogic_vector(7 downto 0); + DONE_OUT : out std_ulogic +); +end component; + +signal data : std_ulogic_vector(7 downto 0) := "00100000"; +signal clk : std_ulogic; +signal RESET : std_ulogic := '0'; +signal done : std_ulogic := '0'; +signal cyclecount : integer := 0; + +constant cycle_time_c : time := 200 ms; +constant maxcycles : integer := 100; + +begin + +simple1 : simple +port map ( + CLK => clk, + RESET => RESET, + DATA_OUT => data, + DONE_OUT => done +); + +clk_process : process +begin + clk <= '0'; + wait for cycle_time_c/2; + clk <= '1'; + wait for cycle_time_c/2; +end process; + +count_process : process(CLK) +begin + if (CLK'event and CLK ='1') then + if (RESET = '1') then + cyclecount <= 0; + else + cyclecount <= cyclecount + 1; + end if; + end if; +end process; + +test : process + +begin + +RESET <= '1'; +wait until (clk'event and clk='1'); +wait until (clk'event and clk='1'); +RESET <= '0'; +wait until (clk'event and clk='1'); +for cyclecnt in 1 to maxcycles loop + exit when done = '1'; + wait until (clk'event and clk='1'); + report integer'image(to_integer(unsigned(data))); +end loop; +wait until (clk'event and clk='1'); + +report "All tests passed." severity NOTE; +wait; +end process; +end beh; diff --git a/pkgs/development/compilers/ghdl/simple.vhd b/pkgs/development/compilers/ghdl/simple.vhd new file mode 100644 index 00000000000..f10cf73d067 --- /dev/null +++ b/pkgs/development/compilers/ghdl/simple.vhd @@ -0,0 +1,45 @@ +library IEEE; +use IEEE.STD_LOGIC_1164.all; +use IEEE.NUMERIC_STD.ALL; +use IEEE.STD_LOGIC_MISC.or_reduce; + +entity simple is + +port ( + CLK, RESET : in std_ulogic; + DATA_OUT : out std_ulogic_vector(7 downto 0); + DONE_OUT : out std_ulogic +); +end simple; + +architecture beh of simple is + +signal data : std_ulogic_vector(7 downto 0); +signal done: std_ulogic; + +begin + +proc_ctr : process(CLK) +begin +if (CLK = '1' and CLK'event) then + if (RESET = '1') then + data <= "01011111"; + done <= '0'; + else + case data is + when "00100000" => data <= "01001110"; + when "01001110" => data <= "01101001"; + when "01101001" => data <= "01111000"; + when "01111000" => data <= "01001111"; + when "01001111" => data <= "01010011"; + when others => data <= "00100000"; + end case; + done <= not or_reduce(data xor "01010011"); + end if; +end if; +end process; + +DATA_OUT <= data; +DONE_OUT <= done; + +end beh; diff --git a/pkgs/development/compilers/ghdl/test-simple.nix b/pkgs/development/compilers/ghdl/test-simple.nix new file mode 100644 index 00000000000..8d3c3d3095f --- /dev/null +++ b/pkgs/development/compilers/ghdl/test-simple.nix @@ -0,0 +1,23 @@ +{ stdenv, ghdl-llvm, ghdl-mcode, backend }: + +let + ghdl = if backend == "llvm" then ghdl-llvm else ghdl-mcode; +in +stdenv.mkDerivation { + name = "ghdl-test-simple"; + meta.timeout = 300; + nativeBuildInputs = [ ghdl ]; + buildCommand = '' + cp ${./simple.vhd} simple.vhd + cp ${./simple-tb.vhd} simple-tb.vhd + mkdir -p ghdlwork + ghdl -a --workdir=ghdlwork --ieee=synopsys simple.vhd simple-tb.vhd + ghdl -e --workdir=ghdlwork --ieee=synopsys -o sim-simple tb + '' + (if backend == "llvm" then '' + ./sim-simple --assert-level=warning > output.txt + '' else '' + ghdl -r --workdir=ghdlwork --ieee=synopsys tb > output.txt + '') + '' + diff output.txt ${./expected-output.txt} && touch $out + ''; +} diff --git a/pkgs/development/python-modules/clevercsv/default.nix b/pkgs/development/python-modules/clevercsv/default.nix new file mode 100644 index 00000000000..36944b5dbec --- /dev/null +++ b/pkgs/development/python-modules/clevercsv/default.nix @@ -0,0 +1,60 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, chardet +, cleo +, clikit +, pandas +, regex +, tabview +, python +}: + +buildPythonPackage rec { + pname = "clevercsv"; + version = "0.6.7"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "alan-turing-institute"; + repo = "CleverCSV"; + rev = "v${version}"; + sha256 = "0j3959bji48pkp0vnk7yls5l75ywjl77jdkvzs62n5mi5lky88p9"; + }; + + propagatedBuildInputs = [ + chardet + cleo + clikit + pandas + regex + tabview + ]; + + pythonImportsCheck = [ + "clevercsv" + "clevercsv.cparser" + ]; + + checkPhase = '' + # by linking the installed version the tests also have access to compiled native libraries + rm -r clevercsv + ln -s $out/${python.sitePackages}/clevercsv/ clevercsv + # their ci only runs unit tests, there are also integration and fuzzing tests + ${python.interpreter} -m unittest discover -v -f -s ./tests/test_unit + ''; + + meta = with lib; { + description = "CleverCSV is a Python package for handling messy CSV files"; + longDescription = '' + CleverCSV is a Python package for handling messy CSV files. It provides + a drop-in replacement for the builtin CSV module with improved dialect + detection, and comes with a handy command line application for working + with CSV files. + ''; + homepage = "https://github.com/alan-turing-institute/CleverCSV"; + changelog = "https://github.com/alan-turing-institute/CleverCSV/blob/master/CHANGELOG.md"; + license = licenses.mit; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/development/python-modules/deepdiff/default.nix b/pkgs/development/python-modules/deepdiff/default.nix index 20aba1b4fa2..83140ff0bb0 100644 --- a/pkgs/development/python-modules/deepdiff/default.nix +++ b/pkgs/development/python-modules/deepdiff/default.nix @@ -1,34 +1,43 @@ { lib , buildPythonPackage -, fetchPypi -, mock -, jsonpickle -, mmh3 +, fetchFromGitHub +, click , ordered-set +, clevercsv +, jsonpickle , numpy , pytestCheckHook +, pyyaml }: buildPythonPackage rec { pname = "deepdiff"; - version = "5.2.3"; + version = "5.3.0"; + format = "setuptools"; - src = fetchPypi { - inherit pname version; - sha256 = "ae2cb98353309f93fbfdda4d77adb08fb303314d836bb6eac3d02ed71a10b40e"; + # pypi source does not contain all fixtures required for tests + src = fetchFromGitHub { + owner = "seperman"; + repo = "deepdiff"; + rev = version; + sha256 = "1izw2qpd93nj948zakamjn7q7dlmmr7sapg0c65hxvs0nmij8sl4"; }; - # # Extra packages (may not be necessary) - checkInputs = [ - mock - numpy - pytestCheckHook + propagatedBuildInputs = [ + click + ordered-set ]; - propagatedBuildInputs = [ + pythonImportsCheck = [ + "deepdiff" + ]; + + checkInputs = [ + clevercsv jsonpickle - mmh3 - ordered-set + numpy + pytestCheckHook + pyyaml ]; meta = with lib; { diff --git a/pkgs/development/python-modules/tabview/default.nix b/pkgs/development/python-modules/tabview/default.nix new file mode 100644 index 00000000000..35a7f7d8a7d --- /dev/null +++ b/pkgs/development/python-modules/tabview/default.nix @@ -0,0 +1,31 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, python +}: + +buildPythonPackage rec { + pname = "tabview"; + version = "1.4.4"; + format = "setuptools"; + + # newest release only available as wheel on pypi + src = fetchFromGitHub { + owner = "TabViewer"; + repo = "tabview"; + rev = version; + sha256 = "1d1l8fhdn3w2zg7wakvlmjmgjh9lh9h5fal1clgyiqmhfix4cn4m"; + }; + + checkPhase = '' + ${python.interpreter} -m unittest discover + ''; + + meta = with lib; { + description = "Python curses command line CSV and tabular data viewer"; + homepage = "https://github.com/TabViewer/tabview"; + changelog = "https://github.com/TabViewer/tabview/blob/main/CHANGELOG.rst"; + license = licenses.mit; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/tools/graphics/grim/default.nix b/pkgs/tools/graphics/grim/default.nix index 1dddd7959b0..f678b2bcae9 100644 --- a/pkgs/tools/graphics/grim/default.nix +++ b/pkgs/tools/graphics/grim/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "grim"; - version = "1.3.1"; + version = "1.3.2"; src = fetchFromGitHub { owner = "emersion"; repo = pname; rev = "v${version}"; - sha256 = "0fjmjq0ws9rlblkcqxxw2lv7zvvyi618jqzlnz5z9zb477jwdfib"; + sha256 = "sha256-71dmYENfPX8YHcTlR2F67EheoewicePMKm9/wPbmj9A="; }; nativeBuildInputs = [ diff --git a/pkgs/tools/misc/macchina/default.nix b/pkgs/tools/misc/macchina/default.nix new file mode 100644 index 00000000000..d975e02d5ac --- /dev/null +++ b/pkgs/tools/misc/macchina/default.nix @@ -0,0 +1,29 @@ +{ lib, rustPlatform, fetchFromGitHub, installShellFiles }: + +rustPlatform.buildRustPackage rec { + pname = "macchina"; + version = "0.6.9"; + + src = fetchFromGitHub { + owner = "Macchina-CLI"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-y23gpYDnYoiTJcNyWKslVenPTXcCrOvxq+0N9PjQN3g="; + }; + + cargoSha256 = "sha256-jfLj8kLBG6AeeYo421JCl1bMqWwOGiwQgv7AEomtFcY="; + + nativeBuildInputs = [ installShellFiles ]; + + postInstall = '' + installShellCompletion target/completions/*.{bash,fish} + ''; + + meta = with lib; { + description = "A fast, minimal and customizable system information fetcher"; + homepage = "https://github.com/Macchina-CLI/macchina"; + changelog = "https://github.com/Macchina-CLI/macchina/releases/tag/v${version}"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ _414owen ]; + }; +} diff --git a/pkgs/tools/misc/watchexec/default.nix b/pkgs/tools/misc/watchexec/default.nix index 5a264db2d4d..ce525dd98dd 100644 --- a/pkgs/tools/misc/watchexec/default.nix +++ b/pkgs/tools/misc/watchexec/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "watchexec"; - version = "1.15.0"; + version = "1.15.1"; src = fetchFromGitHub { owner = pname; repo = pname; rev = version; - sha256 = "1b0ds04q4g8xcgwkziwb5hsi7v73w9y0prvhxz880zzh930652n2"; + sha256 = "1xznhfljvsvc0ykv5h1wg31n93v96lvhbxfhavxivq3b0xh5vxrw"; }; - cargoSha256 = "0jpfgyz5l4fdb5cnqmadzjzrvc6dwgray4b0mx80pghpjw8a8qfb"; + cargoSha256 = "00dampnsnpzmchjcn0j5zslx17i0qgrv99gq772n0683m1l2lfq3"; nativeBuildInputs = [ installShellFiles ]; diff --git a/pkgs/tools/security/tor/default.nix b/pkgs/tools/security/tor/default.nix index 0291d7bb3aa..2e1e1ae2a67 100644 --- a/pkgs/tools/security/tor/default.nix +++ b/pkgs/tools/security/tor/default.nix @@ -30,11 +30,11 @@ let in stdenv.mkDerivation rec { pname = "tor"; - version = "0.4.5.6"; + version = "0.4.5.7"; src = fetchurl { url = "https://dist.torproject.org/${pname}-${version}.tar.gz"; - sha256 = "0cz78pjw2bc3kl3ziip1nhhbq89crv315rf1my3zmmgd9xws7jr2"; + sha256 = "0x7hhl0svfc4yh9xvq7kkzgmwjcw1ak9i0794wjg4biy2fmclzs4"; }; outputs = [ "out" "geoip" ]; diff --git a/pkgs/tools/wayland/slurp/default.nix b/pkgs/tools/wayland/slurp/default.nix index 107ef68da56..1105813550f 100644 --- a/pkgs/tools/wayland/slurp/default.nix +++ b/pkgs/tools/wayland/slurp/default.nix @@ -13,13 +13,13 @@ stdenv.mkDerivation rec { pname = "slurp"; - version = "1.3.1"; + version = "1.3.2"; src = fetchFromGitHub { owner = "emersion"; repo = "slurp"; rev = "v${version}"; - sha256 = "1fby2v2ylcadgclds05wpkl9xi2r9dfz49dqyqpn20rjv1wnz3jv"; + sha256 = "sha256-5ZB34rqLyZmfjT/clxNRDmF0qgITFZ5xt/gIEXQzvQE="; }; nativeBuildInputs = [ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e2e73dec536..8a5bb51863e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2017,6 +2017,8 @@ in clasp = callPackage ../tools/misc/clasp { }; + clevercsv = with python3Packages; toPythonApplication clevercsv; + clevis = callPackage ../tools/security/clevis { asciidoc = asciidoc-full; }; @@ -6438,6 +6440,8 @@ in macchanger = callPackage ../os-specific/linux/macchanger { }; + macchina = callPackage ../tools/misc/macchina { }; + madlang = haskell.lib.justStaticExecutables haskellPackages.madlang; maeparser = callPackage ../development/libraries/maeparser { }; @@ -7504,6 +7508,8 @@ in tab = callPackage ../tools/text/tab { }; + tabview = with python3Packages; toPythonApplication tabview; + tautulli = python3Packages.callPackage ../servers/tautulli { }; pleroma-otp = callPackage ../servers/pleroma-otp { }; @@ -28570,6 +28576,8 @@ in dcm2niix = callPackage ../applications/science/biology/dcm2niix { }; + deepdiff = with python3Packages; toPythonApplication deepdiff; + deepsea = callPackage ../tools/security/deepsea { }; deeptools = callPackage ../applications/science/biology/deeptools { python = python3; }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 57da419a7da..32425fc76f2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1343,6 +1343,8 @@ in { cleo = callPackage ../development/python-modules/cleo { }; + clevercsv = callPackage ../development/python-modules/clevercsv { }; + clf = callPackage ../development/python-modules/clf { }; click = callPackage ../development/python-modules/click { }; @@ -7689,6 +7691,8 @@ in { tabulate = callPackage ../development/python-modules/tabulate { }; + tabview = callPackage ../development/python-modules/tabview { }; + tadasets = callPackage ../development/python-modules/tadasets { }; tag-expressions = callPackage ../development/python-modules/tag-expressions { };