mirror of
https://github.com/ihaveamac/ninfs.git
synced 2025-06-18 08:55:34 -04:00
add nix flake and stuff
This commit is contained in:
parent
d492069e27
commit
c96f0a29ae
2
.gitignore
vendored
2
.gitignore
vendored
@ -10,3 +10,5 @@ __pycache__/
|
||||
*.pyd
|
||||
# dll and dylib are not here, since libcrypto needs to be included
|
||||
Thumbs.db
|
||||
result
|
||||
result-*
|
||||
|
6
default.nix
Normal file
6
default.nix
Normal file
@ -0,0 +1,6 @@
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
|
||||
rec {
|
||||
haccrypto = pkgs.python3Packages.callPackage ./haccrypto.nix {};
|
||||
ninfs = pkgs.python3Packages.callPackage ./ninfs.nix { haccrypto = haccrypto; };
|
||||
}
|
61
flake.lock
generated
Normal file
61
flake.lock
generated
Normal file
@ -0,0 +1,61 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1705309234,
|
||||
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1707451808,
|
||||
"narHash": "sha256-UwDBUNHNRsYKFJzyTMVMTF5qS4xeJlWoeyJf+6vvamU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "442d407992384ed9c0e6d352de75b69079904e4e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
21
flake.nix
Normal file
21
flake.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
description = "ninfs";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, flake-utils }:
|
||||
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system}; in {
|
||||
|
||||
packages = rec {
|
||||
haccrypto = pkgs.python3Packages.callPackage ./haccrypto.nix {};
|
||||
ninfs = pkgs.python3Packages.callPackage ./ninfs.nix { haccrypto = haccrypto; };
|
||||
default = ninfs;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
18
haccrypto.nix
Normal file
18
haccrypto.nix
Normal file
@ -0,0 +1,18 @@
|
||||
{ lib, buildPythonPackage, pythonOlder, fetchPypi }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "haccrypto";
|
||||
version = "0.1.3";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-PHkAxy0lq7SsdQlKSq2929Td8UDFVMleCYnq2t1xg44=";
|
||||
};
|
||||
|
||||
pythonImportsCheck = [
|
||||
"haccrypto"
|
||||
];
|
||||
}
|
20
ninfs.nix
Normal file
20
ninfs.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{ lib, callPackage, buildPythonApplication, fetchPypi, pyctr, pycryptodomex, pypng, tkinter, setuptools, fusepy, haccrypto, pip }:
|
||||
|
||||
buildPythonApplication rec {
|
||||
pname = "ninfs";
|
||||
version = "2.0a11";
|
||||
format = "setuptools";
|
||||
|
||||
srcs = builtins.path { path = ./.; name = "ninfs"; };
|
||||
|
||||
propagatedBuildInputs = [
|
||||
pyctr
|
||||
pycryptodomex
|
||||
pypng
|
||||
tkinter
|
||||
setuptools # missing from requirements.txt
|
||||
fusepy # despite ninfs including its own copy of fuse.py, it can't find it for some reason
|
||||
pip
|
||||
haccrypto
|
||||
];
|
||||
}
|
@ -7,6 +7,11 @@
|
||||
from os.path import dirname, realpath
|
||||
from sys import argv, exit, path
|
||||
|
||||
if 'nix_run_setup' in argv:
|
||||
# I don't understand why this gets called with nix build!
|
||||
print('nix build is calling me!')
|
||||
exit(0)
|
||||
|
||||
# path fun times
|
||||
path.insert(0, dirname(realpath(__file__)))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user