wip flake

This commit is contained in:
Jill 2022-08-02 11:07:06 +02:00
parent 33af8be333
commit 552a5850ca
3 changed files with 119 additions and 1 deletions

3
.gitignore vendored
View File

@ -1,3 +1,4 @@
config.json
__pycache__
.vscode
.vscode
result

93
flake.lock Normal file
View File

@ -0,0 +1,93 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1642700792,
"narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "846b2ae0fc4cc943637d3d1def4454213e203cba",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"mach-nix": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"pypi-deps-db": "pypi-deps-db"
},
"locked": {
"lastModified": 1659091740,
"narHash": "sha256-aNtnezQfUX1QS/bFno2H5661qIY/Rn7BmHnspuuyI+4=",
"owner": "DavHau",
"repo": "mach-nix",
"rev": "f15ea8677df951cb4fe608945fd98725dcd033b3",
"type": "github"
},
"original": {
"owner": "DavHau",
"repo": "mach-nix",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1643805626,
"narHash": "sha256-AXLDVMG+UaAGsGSpOtQHPIKB+IZ0KSd9WS77aanGzgc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "554d2d8aa25b6e583575459c297ec23750adb6cb",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1659412156,
"narHash": "sha256-9b0IvLVa1nsVwu3RZA715gk0XBZ1vkXv5MKH3t8lnbc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d7b20c17b4b5ab5c65756e1196bedf801c0433e9",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"type": "github"
}
},
"pypi-deps-db": {
"flake": false,
"locked": {
"lastModified": 1643877077,
"narHash": "sha256-jv8pIvRFTP919GybOxXE5TfOkrjTbdo9QiCO1TD3ZaY=",
"owner": "DavHau",
"repo": "pypi-deps-db",
"rev": "da53397f0b782b0b18deb72ef8e0fb5aa7c98aa3",
"type": "github"
},
"original": {
"owner": "DavHau",
"repo": "pypi-deps-db",
"type": "github"
}
},
"root": {
"inputs": {
"mach-nix": "mach-nix",
"nixpkgs": "nixpkgs_2"
}
}
},
"root": "root",
"version": 7
}

24
flake.nix Normal file
View File

@ -0,0 +1,24 @@
{
description = "Minimal fork of https://github.com/Twxtter/Twxtter-main meant for embedding alongside Nitter";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
mach-nix.url = "github:DavHau/mach-nix";
};
outputs = { self, nixpkgs, mach-nix }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
baseConfig = {
requirements = builtins.readFile ./requirements.txt;
};
machNix = mach-nix.lib."${system}";
in {
devShells."${system}".default = machNix.mkPythonShell baseConfig // {
};
packages."${system}".default = machNix.mkPython baseConfig // {
};
};
}