atuin: 18.3.0 -> 18.4.0 (#369322)

authored by Adam C. Stephens and committed by GitHub d836dc6e 4010d94b

+49 -46
+1 -1
nixos/tests/all-tests.nix
··· 140 atd = handleTest ./atd.nix {}; 141 atop = handleTest ./atop.nix {}; 142 atticd = runTest ./atticd.nix; 143 - atuin = handleTest ./atuin.nix {}; 144 audiobookshelf = handleTest ./audiobookshelf.nix {}; 145 auth-mysql = handleTest ./auth-mysql.nix {}; 146 authelia = handleTest ./authelia.nix {};
··· 140 atd = handleTest ./atd.nix {}; 141 atop = handleTest ./atop.nix {}; 142 atticd = runTest ./atticd.nix; 143 + atuin = runTest ./atuin.nix; 144 audiobookshelf = handleTest ./audiobookshelf.nix {}; 145 auth-mysql = handleTest ./auth-mysql.nix {}; 146 authelia = handleTest ./authelia.nix {};
+44 -35
nixos/tests/atuin.nix
··· 1 - import ./make-test-python.nix ( 2 - { pkgs, lib, ... }: 3 4 - let 5 - testPort = 8888; 6 - testUser = "testerman"; 7 - testPass = "password"; 8 - testEmail = "test.testerman@test.com"; 9 - in 10 - { 11 - name = "atuin"; 12 - meta.maintainers = with lib.maintainers; [ devusb ]; 13 14 - nodes = { 15 - server = 16 - { ... }: 17 - { 18 - services.postgresql.enable = true; 19 20 - services.atuin = { 21 - enable = true; 22 - port = testPort; 23 - host = "0.0.0.0"; 24 - openFirewall = true; 25 - openRegistration = true; 26 - }; 27 }; 28 29 - client = { ... }: { }; 30 31 - }; 32 33 - testScript = with pkgs; '' 34 start_all() 35 36 # wait for atuin server startup ··· 42 server.execute("echo 'sync_address = \"http://localhost:${toString testPort}\"' > ~/.config/atuin/config.toml") 43 44 # register with atuin server on server node 45 - server.succeed("${atuin}/bin/atuin register -u ${testUser} -p ${testPass} -e ${testEmail}") 46 - _, key = server.execute("${atuin}/bin/atuin key") 47 48 # store test record in atuin server and sync 49 - server.succeed("ATUIN_SESSION=$(${atuin}/bin/atuin uuid) ${atuin}/bin/atuin history start 'shazbot'") 50 - server.succeed("${atuin}/bin/atuin sync") 51 52 # configure atuin client on client node 53 client.execute("mkdir -p ~/.config/atuin") 54 client.execute("echo 'sync_address = \"http://server:${toString testPort}\"' > ~/.config/atuin/config.toml") 55 56 # log in to atuin server on client node 57 - client.succeed(f"${atuin}/bin/atuin login -u ${testUser} -p ${testPass} -k \"{key}\"") 58 59 # pull records from atuin server 60 - client.succeed("${atuin}/bin/atuin sync -f") 61 62 # check for test record 63 - client.succeed("ATUIN_SESSION=$(${atuin}/bin/atuin uuid) ${atuin}/bin/atuin history list | grep shazbot") 64 ''; 65 - } 66 - )
··· 1 + { lib, ... }: 2 3 + let 4 + testPort = 8888; 5 + testUser = "testerman"; 6 + testPass = "password"; 7 + testEmail = "test.testerman@test.com"; 8 + in 9 + { 10 + name = "atuin"; 11 + meta.maintainers = with lib.maintainers; [ devusb ]; 12 13 + defaults = 14 + { pkgs, ... }: 15 + { 16 + environment.systemPackages = [ 17 + pkgs.atuin 18 + ]; 19 + }; 20 21 + nodes = { 22 + server = 23 + { ... }: 24 + { 25 + services.postgresql.enable = true; 26 + 27 + services.atuin = { 28 + enable = true; 29 + port = testPort; 30 + host = "0.0.0.0"; 31 + openFirewall = true; 32 + openRegistration = true; 33 }; 34 + }; 35 36 + client = { ... }: { }; 37 38 + }; 39 40 + testScript = 41 + { nodes, ... }: 42 + #python 43 + '' 44 start_all() 45 46 # wait for atuin server startup ··· 52 server.execute("echo 'sync_address = \"http://localhost:${toString testPort}\"' > ~/.config/atuin/config.toml") 53 54 # register with atuin server on server node 55 + server.succeed("atuin register -u ${testUser} -p ${testPass} -e ${testEmail}") 56 + _, key = server.execute("atuin key") 57 58 # store test record in atuin server and sync 59 + server.succeed("ATUIN_SESSION=$(atuin uuid) atuin history start 'shazbot'") 60 + server.succeed("ATUIN_SESSION=$(atuin uuid) atuin sync") 61 62 # configure atuin client on client node 63 client.execute("mkdir -p ~/.config/atuin") 64 client.execute("echo 'sync_address = \"http://server:${toString testPort}\"' > ~/.config/atuin/config.toml") 65 66 # log in to atuin server on client node 67 + client.succeed(f"atuin login -u ${testUser} -p ${testPass} -k \"{key}\"") 68 69 # pull records from atuin server 70 + client.succeed("atuin sync -f") 71 72 # check for test record 73 + client.succeed("ATUIN_SESSION=$(atuin uuid) atuin history list | grep shazbot") 74 ''; 75 + }
+4 -10
pkgs/by-name/at/atuin/package.nix
··· 4 fetchFromGitHub, 5 installShellFiles, 6 rustPlatform, 7 - buildPackages, 8 apple-sdk_11, 9 nixosTests, 10 }: 11 12 rustPlatform.buildRustPackage rec { 13 pname = "atuin"; 14 - version = "18.3.0"; 15 16 src = fetchFromGitHub { 17 owner = "atuinsh"; 18 repo = "atuin"; 19 rev = "v${version}"; 20 - hash = "sha256-Q3UI1IUD5Jz2O4xj3mFM7DqY3lTy3WhWYPa8QjJHTKE="; 21 }; 22 23 # TODO: unify this to one hash because updater do not support this 24 cargoHash = 25 if stdenv.hostPlatform.isLinux then 26 - "sha256-K4Vw/d0ZOROWujWr76I3QvfKefLhXLeFufUrgStAyjQ=" 27 else 28 - "sha256-8NAfE7cGFT64ntNXK9RT0D/MbDJweN7vvsG/KlrY4K4="; 29 30 # atuin's default features include 'check-updates', which do not make sense 31 # for distribution builds. List all other default features. ··· 43 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ 44 apple-sdk_11 45 ]; 46 - 47 - preBuild = '' 48 - export PROTOC=${buildPackages.protobuf}/bin/protoc 49 - export PROTOC_INCLUDE="${buildPackages.protobuf}/include"; 50 - ''; 51 52 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' 53 installShellCompletion --cmd atuin \
··· 4 fetchFromGitHub, 5 installShellFiles, 6 rustPlatform, 7 apple-sdk_11, 8 nixosTests, 9 }: 10 11 rustPlatform.buildRustPackage rec { 12 pname = "atuin"; 13 + version = "18.4.0"; 14 15 src = fetchFromGitHub { 16 owner = "atuinsh"; 17 repo = "atuin"; 18 rev = "v${version}"; 19 + hash = "sha256-P/q4XYhpXo9kwiltA0F+rQNSlqI+s8TSi5v5lFJWJ/4="; 20 }; 21 22 # TODO: unify this to one hash because updater do not support this 23 cargoHash = 24 if stdenv.hostPlatform.isLinux then 25 + "sha256-JDm7HWMaLSodpOhrR7rm6ZS/ATX/q8fRK+OJ/EKqg3U=" 26 else 27 + "sha256-mrsqaqJHMyNi3yFDIyAXFBS+LY71VWXE8O7mjvgI6lo="; 28 29 # atuin's default features include 'check-updates', which do not make sense 30 # for distribution builds. List all other default features. ··· 42 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ 43 apple-sdk_11 44 ]; 45 46 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' 47 installShellCompletion --cmd atuin \