 84d4f874c2
			
		
	
	
		84d4f874c2
		
	
	
	
	
		
			
			After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev 78e9caf153f5a339bf1d4c000ff6f0a503a369c8
    result/bin/apply-formatting $NIXPKGS_PATH
		
	
			
		
			
				
	
	
		
			85 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			85 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
| {
 | |
|   lib,
 | |
|   python3Packages,
 | |
|   fetchPypi,
 | |
|   onlykey-cli,
 | |
| }:
 | |
| 
 | |
| let
 | |
|   bech32 =
 | |
|     with python3Packages;
 | |
|     buildPythonPackage rec {
 | |
|       pname = "bech32";
 | |
|       version = "1.2.0";
 | |
| 
 | |
|       src = fetchPypi {
 | |
|         inherit pname version;
 | |
|         sha256 = "sha256-fW24IUYDvXhx/PpsCCbvaLhbCr2Q+iHChanF4h0r2Jk=";
 | |
|       };
 | |
|     };
 | |
| 
 | |
|   # onlykey requires a patched version of libagent
 | |
|   lib-agent =
 | |
|     with python3Packages;
 | |
|     libagent.overridePythonAttrs (oa: rec {
 | |
|       version = "1.0.6";
 | |
|       src = fetchPypi {
 | |
|         inherit version;
 | |
|         pname = "lib-agent";
 | |
|         sha256 = "sha256-IrJizIHDIPHo4tVduUat7u31zHo3Nt8gcMOyUUqkNu0=";
 | |
|       };
 | |
|       propagatedBuildInputs = oa.propagatedBuildInputs or [ ] ++ [
 | |
|         bech32
 | |
|         cryptography
 | |
|         cython
 | |
|         docutils
 | |
|         pycryptodome
 | |
|         pynacl
 | |
|         wheel
 | |
|       ];
 | |
| 
 | |
|       # turn off testing because I can't get it to work
 | |
|       doCheck = false;
 | |
|       pythonImportsCheck = [ "libagent" ];
 | |
| 
 | |
|       meta = oa.meta // {
 | |
|         description = "Using OnlyKey as hardware SSH and GPG agent";
 | |
|         homepage = "https://github.com/trustcrypto/onlykey-agent/tree/ledger";
 | |
|         maintainers = with lib.maintainers; [ kalbasit ];
 | |
|       };
 | |
|     });
 | |
| in
 | |
| python3Packages.buildPythonApplication rec {
 | |
|   pname = "onlykey-agent";
 | |
|   version = "1.1.15";
 | |
| 
 | |
|   src = fetchPypi {
 | |
|     inherit pname version;
 | |
|     hash = "sha256-SbGb7CjcD7cFPvASZtip56B4uxRiFKZBvbsf6sb8fds=";
 | |
|   };
 | |
| 
 | |
|   propagatedBuildInputs = with python3Packages; [
 | |
|     lib-agent
 | |
|     onlykey-cli
 | |
|     setuptools
 | |
|   ];
 | |
| 
 | |
|   # move the python library into the sitePackages.
 | |
|   postInstall = ''
 | |
|     mkdir $out/${python3Packages.python.sitePackages}/onlykey_agent
 | |
|     mv $out/bin/onlykey_agent.py $out/${python3Packages.python.sitePackages}/onlykey_agent/__init__.py
 | |
|     chmod a-x $out/${python3Packages.python.sitePackages}/onlykey_agent/__init__.py
 | |
|   '';
 | |
| 
 | |
|   # no tests
 | |
|   doCheck = false;
 | |
|   pythonImportsCheck = [ "onlykey_agent" ];
 | |
| 
 | |
|   meta = with lib; {
 | |
|     description = "Middleware that lets you use OnlyKey as a hardware SSH/GPG device";
 | |
|     homepage = "https://github.com/trustcrypto/onlykey-agent";
 | |
|     license = licenses.lgpl3Only;
 | |
|     maintainers = with maintainers; [ kalbasit ];
 | |
|   };
 | |
| }
 |