File tree Expand file tree Collapse file tree 2 files changed +117
-0
lines changed
Expand file tree Collapse file tree 2 files changed +117
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ description = ''
3+ Anki add-on for multiple answers in "type in the answer" cards
4+ '' ;
5+
6+ inputs = {
7+ nixpkgs . url = "github:NixOS/nixpkgs/nixpkgs-unstable" ;
8+ } ;
9+
10+ outputs =
11+ {
12+ self ,
13+ nixpkgs ,
14+ flake-utils ,
15+ } :
16+ flake-utils . lib . eachDefaultSystem (
17+ system :
18+ let
19+ pkgs = nixpkgs . legacyPackages . ${ system } ;
20+
21+ pythonWithPackages = pkgs . python311 . withPackages (
22+ python-pkgs : with python-pkgs ; [
23+ mypy
24+ pytest
25+ pytest-cov
26+ ]
27+ ) ;
28+
29+ packages = with pkgs ; [
30+ anki
31+ pythonWithPackages
32+ ruff
33+ zip
34+ ] ;
35+ in
36+ {
37+ packages . default = pkgs . stdenv . mkDerivation {
38+ pname = "answerset" ;
39+ version = self . shortRev or "dirty" ;
40+ src = self ;
41+ nativeBuildInputs = packages ;
42+ doCheck = true ;
43+ checkTarget = "test" ;
44+ installPhase = ''
45+ mkdir $out
46+ cp answerset.ankiaddon $out
47+ '' ;
48+ } ;
49+
50+ checks . default = self . packages . ${ system } . default ;
51+
52+ devShells . default = pkgs . mkShell { inherit packages ; } ;
53+
54+ formatter = pkgs . nixfmt-rfc-style ;
55+ }
56+ ) ;
57+ }
You can’t perform that action at this time.
0 commit comments