From 611b0ddfd7c3e7fe966ea7be21ecdbf4c679a130 Mon Sep 17 00:00:00 2001 From: "Robert T. McGibbon" Date: Sat, 5 Jun 2021 12:31:30 -0400 Subject: [PATCH] Convert project to flake --- .github/workflows/action.yml | 74 ++++----- default.nix | 89 ----------- flake.lock | 281 +++++++++++++++++++++++++++++++++++ flake.nix | 173 +++++++++++++++++++++ nixbot-backend/default.nix | 12 +- nixbot-common/default.nix | 2 +- nixbot-frontend/default.nix | 2 +- 7 files changed, 499 insertions(+), 134 deletions(-) delete mode 100644 default.nix create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 8732e74..5d96992 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -6,49 +6,49 @@ on: branches: [ master ] jobs: - x86_64: + x86-64: runs-on: ubuntu-20.04 steps: + # Installation - uses: actions/checkout@v2.3.4 - - uses: cachix/install-nix-action@v12 + - uses: cachix/install-nix-action@v13 with: - nix_path: nixpkgs=channel:nixos-20.09 - - uses: cachix/cachix-action@v8 - with: - name: nixpkgs-review-bot - authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + install_url: https://nixos-nix-install-tests.cachix.org/serve/lb41az54kzk6j12p81br4bczary7m145/install + install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve' + extra_nix_config: | + experimental-features = nix-command flakes + # Build - name: Build run: | - nix build \ - --print-build-logs \ - -f . \ - nixbot-backend nixbot-frontend + nix build .#nixbot-frontend -L --show-trace + nix build .#nixbot-backend -L --show-trace - aarch64: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2.3.4 - - uses: cachix/install-nix-action@v12 - with: - nix_path: nixpkgs=channel:nixos-20.09 - - run: | - DEBIAN_FRONTEND=noninteractive - sudo apt-get update -q -y && sudo apt-get install -q -y qemu-system-aarch64 qemu-efi binfmt-support qemu-user-static - mkdir -p ~/.config/nix - sudo bash -c "echo system-features = aarch64-linux arm-linux >> /etc/nix/nix.conf" - - uses: cachix/cachix-action@v8 - with: - name: nixpkgs-review-bot - authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - - name: Build - timeout-minutes: 3000 - run: | - nix build \ - --print-build-logs \ - --option system aarch64-linux \ - --option sandbox false \ - --extra-platforms aarch64-linux \ - -f . \ - nixbot-backend nixbot-frontend + + # aarch64: + # runs-on: ubuntu-20.04 + # steps: + # - uses: actions/checkout@v2.3.4 + # - uses: cachix/install-nix-action@v12 + # with: + # nix_path: nixpkgs=channel:nixos-20.09 + # - run: | + # DEBIAN_FRONTEND=noninteractive + # sudo apt-get update -q -y && sudo apt-get install -q -y qemu-system-aarch64 qemu-efi binfmt-support qemu-user-static + # mkdir -p ~/.config/nix + # sudo bash -c "echo system-features = aarch64-linux arm-linux >> /etc/nix/nix.conf" + # - uses: cachix/cachix-action@v8 + # with: + # name: nixpkgs-review-bot + # authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + # - name: Build + # timeout-minutes: 3000 + # run: | + # nix build \ + # --print-build-logs \ + # --option system aarch64-linux \ + # --option sandbox false \ + # --extra-platforms aarch64-linux \ + # -f . \ + # nixbot-backend nixbot-frontend diff --git a/default.nix b/default.nix deleted file mode 100644 index 348c29b..0000000 --- a/default.nix +++ /dev/null @@ -1,89 +0,0 @@ -{ pkgs ? import { } -}: - -with pkgs; -with lib; -rec { - system = builtins.currentSystem; - unstable = import - (fetchTarball { - url = - "https://github.com/NixOS/nixpkgs/archive/6ed55034eec21f50c33afe7b4c4f5c13d49eba72.tar.gz"; - sha256 = "0594l26gmlc5s48hmrj37mq85hv9hbqvari3ckvzj0z4h4h8b50g"; - }) { }; - - nixpkgs-review = import (fetchFromGitHub { - owner = "rmcgibbo"; - repo = "nixpkgs-review"; - rev = "9f4884a8c292c144b8a29c7adc1c941ece6a12ed"; - sha256 = "1drk3hspampfcfz6x3h2dki15lkhyv5y9kjpvsknixccn13i2jk2"; - }) { }; - - nixpkgs-hammer = (import (pkgs.fetchFromGitHub { - owner = "jtojnar"; - repo = "nixpkgs-hammering"; - rev = "6a4f88d82ab7d0a95cf21494896bce40f7a4ac22"; - sha256 = "0597xl1q50ykwhvmnx30r2vvrlqfz8kpvr2zykcfj26rw69b8lh7"; - })).defaultPackage.${system}; - - statx = import (pkgs.fetchFromGitHub { - owner = "rmcgibbo"; - repo = "statx"; - rev = "ba90b5dd37fb1f5f01465015564e0a0aeb2cb5c3"; - sha256 = "0b0jrvas4rk4qvqn0pmw1v1ykzid6pzacrqmwkpn52azvmf904sr"; - }) { pkgs = pkgs; pythonPackages = python38.pkgs; }; - - precedence-constrained-knapsack = unstable.callPackage (fetchFromGitHub { - owner = "rmcgibbo"; - repo = "precedenceConstrainedKnapsack"; - rev = "fa4cc8556650acbaf74b7a75ab3e2b52bb3f44f7"; - sha256 = "0jzazpxg281xlswxdz0lhfwx4ivsckd85r92a0chyahh7rp1ygjg"; - }) { pkgs = unstable; python3Packages = unstable.python38Packages; }; - - pyfst = unstable.python38Packages.callPackage (fetchFromGitHub { - owner = "rmcgibbo"; - repo = "pyfst"; - rev = "f22b453fca8b83dd6a698fc30845a75d5d6c3cd7"; - sha256 = "sha256-xyZgQU/EOlbdlTOwGCZSRL7qzTAl6mhzyelIENkaXD8="; - }) { }; - - python-dynamodb-lock = with pkgs.python38Packages; buildPythonPackage rec { - pname = "python-dynamodb-lock"; - version = "0.9.3"; - - src = pkgs.fetchFromGitHub { - owner = "whatnick"; - repo = "python_dynamodb_lock"; - rev = "v${version}"; - sha256 = "1jpn8mpxzx00cm9gm8z40rh0j0iw5akrm02qc8cd9v8z8dj7ysjf"; - }; - - patches = [ - # Fixes compatibility of the test suite with python3.9 - (pkgs.fetchpatch { - url = "https://github.com/rmcgibbo/python_dynamodb_lock/commit/35a77d79b4b8afc6d3947af3110de05be83e0c19.patch"; - sha256 = "0jfwd01vcgszqp4mml7rzsaxnns48j5n2cfphqr07f1cw0gbs41c"; - }) - ]; - - propagatedBuildInputs = [ boto3 ]; - checkInputs = [ pytestCheckHook ]; - pythonImportsCheck = [ "python_dynamodb_lock" ]; - }; - - nixbot-common = pkgs.python38.pkgs.callPackage ./nixbot-common { }; - - nixbot-backend = pkgs.python38.pkgs.callPackage ./nixbot-backend { - inherit nixbot-common; - inherit nixpkgs-hammer; - inherit nixpkgs-review; - inherit precedence-constrained-knapsack; - inherit statx; - inherit pyfst; - inherit python-dynamodb-lock; - }; - nixbot-frontend = pkgs.python38.pkgs.callPackage ./nixbot-frontend { - inherit nixbot-common; - aiostream = unstable.python38Packages.aiostream; - }; -} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..ee721b4 --- /dev/null +++ b/flake.lock @@ -0,0 +1,281 @@ +{ + "nodes": { + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1606424373, + "narHash": "sha256-oq8d4//CJOrVj+EcOaSXvMebvuTkmBJuT5tzlfewUnQ=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "99f1c2157fba4bfe6211a321fd0ee43199025dbf", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-utils": { + "locked": { + "lastModified": 1610051610, + "narHash": "sha256-U9rPz/usA1/Aohhk7Cmc2gBrEEKRzcW4nwPWMPwja4Y=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "3982c9903e93927c2164caa727cd3f6a0e6d14cc", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "naersk": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1618844365, + "narHash": "sha256-Z9t0rr+5OG/ru3jdg3jivfYVU4ydV/nqt8UwIut7uHs=", + "owner": "nmattia", + "repo": "naersk", + "rev": "32e3ba39d9d83098b13720a4384bdda191dd0445", + "type": "github" + }, + "original": { + "owner": "nmattia", + "repo": "naersk", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1622922048, + "narHash": "sha256-nTyKxe0n7l/4HSmYaIN+63WQrvHrTJY6drSwP7bMqhU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5de44c15758465f8ddf84d541ba300b48e56eda4", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-21.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-hammering": { + "inputs": { + "flake-compat": "flake-compat", + "naersk": "naersk", + "nixpkgs": [ + "nixpkgs" + ], + "utils": [ + "utils" + ] + }, + "locked": { + "lastModified": 1620399875, + "narHash": "sha256-B1K0kuHZCOnY9F/kfSf6DtO8t8hgdFs35NODggPtJxU=", + "owner": "jtojnar", + "repo": "nixpkgs-hammering", + "rev": "6a4f88d82ab7d0a95cf21494896bce40f7a4ac22", + "type": "github" + }, + "original": { + "owner": "jtojnar", + "repo": "nixpkgs-hammering", + "type": "github" + } + }, + "nixpkgs-review": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1623021825, + "narHash": "sha256-Xs6AbZ69LlPIEfUziuZYzWEtKVW4K1Abng9+UBD+HeU=", + "owner": "rmcgibbo", + "repo": "nixpkgs-review", + "rev": "b5bc2eac882a18f9f7f1e7acf34f8d55965aba92", + "type": "github" + }, + "original": { + "owner": "rmcgibbo", + "repo": "nixpkgs-review", + "rev": "b5bc2eac882a18f9f7f1e7acf34f8d55965aba92", + "type": "github" + } + }, + "precedence-constrained-knapsack": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "py-utils": "py-utils", + "utils": [ + "utils" + ] + }, + "locked": { + "lastModified": 1622928741, + "narHash": "sha256-MnpJtOxGscQY3ncxe87ByOVNXzsNlfownxZOIw+JyAw=", + "owner": "rmcgibbo", + "repo": "precedenceConstrainedKnapsack", + "rev": "b3ca0c9847572cc77fb671a847aa7d107a60c3b9", + "type": "github" + }, + "original": { + "owner": "rmcgibbo", + "repo": "precedenceConstrainedKnapsack", + "type": "github" + } + }, + "py-utils": { + "locked": { + "lastModified": 1622925786, + "narHash": "sha256-rhdXGpPo+w5unxTyknBlRohjUunjipkMNQDhRhdvCwI=", + "owner": "rmcgibbo", + "repo": "python-flake-utils", + "rev": "a7c6e80d8fdd1f00ab5a873e3f73516554307a1f", + "type": "github" + }, + "original": { + "owner": "rmcgibbo", + "repo": "python-flake-utils", + "type": "github" + } + }, + "py-utils_2": { + "locked": { + "lastModified": 1622925786, + "narHash": "sha256-rhdXGpPo+w5unxTyknBlRohjUunjipkMNQDhRhdvCwI=", + "owner": "rmcgibbo", + "repo": "python-flake-utils", + "rev": "a7c6e80d8fdd1f00ab5a873e3f73516554307a1f", + "type": "github" + }, + "original": { + "owner": "rmcgibbo", + "repo": "python-flake-utils", + "type": "github" + } + }, + "py-utils_3": { + "locked": { + "lastModified": 1622925786, + "narHash": "sha256-rhdXGpPo+w5unxTyknBlRohjUunjipkMNQDhRhdvCwI=", + "owner": "rmcgibbo", + "repo": "python-flake-utils", + "rev": "a7c6e80d8fdd1f00ab5a873e3f73516554307a1f", + "type": "github" + }, + "original": { + "owner": "rmcgibbo", + "repo": "python-flake-utils", + "type": "github" + } + }, + "pyfst": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "py-utils": "py-utils_2", + "utils": [ + "utils" + ] + }, + "locked": { + "lastModified": 1622928244, + "narHash": "sha256-VSYS/1OKKoeK3GPbPskfagZz+/2MwMQ1FviVFaG8tJo=", + "owner": "rmcgibbo", + "repo": "pyfst", + "rev": "8521f9dbefe0242aede3cb0ad292c31656495a88", + "type": "github" + }, + "original": { + "owner": "rmcgibbo", + "repo": "pyfst", + "type": "github" + } + }, + "python-dynamodb-lock-src": { + "flake": false, + "locked": { + "lastModified": 1616906969, + "narHash": "sha256-I4NPRCTHV2e3DAy3vbhFtxnsGEiBU+ur0Bo8rJ886bU=", + "owner": "rmcgibbo", + "repo": "python_dynamodb_lock", + "rev": "35a77d79b4b8afc6d3947af3110de05be83e0c19", + "type": "github" + }, + "original": { + "owner": "rmcgibbo", + "repo": "python_dynamodb_lock", + "rev": "35a77d79b4b8afc6d3947af3110de05be83e0c19", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "nixpkgs-hammering": "nixpkgs-hammering", + "nixpkgs-review": "nixpkgs-review", + "precedence-constrained-knapsack": "precedence-constrained-knapsack", + "pyfst": "pyfst", + "python-dynamodb-lock-src": "python-dynamodb-lock-src", + "statx": "statx", + "utils": "utils" + } + }, + "statx": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "py-utils": "py-utils_3", + "utils": [ + "utils" + ] + }, + "locked": { + "lastModified": 1622925827, + "narHash": "sha256-OtDSztg9RdMQgTCnValuy/qiwRy37pvPh11lAlPt1PI=", + "owner": "rmcgibbo", + "repo": "statx", + "rev": "0d51fdfc1d7e40baa7dfc034e915440b506aabd4", + "type": "github" + }, + "original": { + "owner": "rmcgibbo", + "repo": "statx", + "type": "github" + } + }, + "utils": { + "locked": { + "lastModified": 1622445595, + "narHash": "sha256-m+JRe6Wc5OZ/mKw2bB3+Tl0ZbtyxxxfnAWln8Q5qs+Y=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "7d706970d94bc5559077eb1a6600afddcd25a7c8", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..0499683 --- /dev/null +++ b/flake.nix @@ -0,0 +1,173 @@ +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.05"; + utils.url = "github:numtide/flake-utils"; + nixpkgs-review = { + url = + "github:rmcgibbo/nixpkgs-review/b5bc2eac882a18f9f7f1e7acf34f8d55965aba92"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nixpkgs-hammering = { + url = "github:jtojnar/nixpkgs-hammering"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.utils.follows = "utils"; + }; + python-dynamodb-lock-src = { + url = + "github:rmcgibbo/python_dynamodb_lock/35a77d79b4b8afc6d3947af3110de05be83e0c19"; + flake = false; + }; + precedence-constrained-knapsack = { + url = "github:rmcgibbo/precedenceConstrainedKnapsack"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.utils.follows = "utils"; + }; + statx = { + url = "github:rmcgibbo/statx"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.utils.follows = "utils"; + }; + pyfst = { + url = "github:rmcgibbo/pyfst"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.utils.follows = "utils"; + }; + }; + + outputs = + { self + , utils + , nixpkgs + , nixpkgs-review + , nixpkgs-hammering + , python-dynamodb-lock-src + , statx + , precedence-constrained-knapsack + , pyfst + }: + utils.lib.eachSystem ["x86_64-linux" "aarch64-linux"] (system: + let + pkgs = import nixpkgs { + inherit system; + overlays = [ + statx.overlay + nixpkgs-hammering.overlay + precedence-constrained-knapsack.overlay + pyfst.overlay + ]; + }; + python-dynamodb-lock = with pkgs.python38Packages; + buildPythonPackage rec { + pname = "python-dynamodb-lock"; + version = "0.9.3"; + src = python-dynamodb-lock-src; + propagatedBuildInputs = [ boto3 ]; + checkInputs = [ pytestCheckHook ]; + pythonImportsCheck = [ "python_dynamodb_lock" ]; + }; + nixbot-common = pkgs.python38.pkgs.callPackage ./nixbot-common { }; + nixbot-backend = pkgs.python38.pkgs.callPackage ./nixbot-backend { + inherit nixbot-common; + inherit python-dynamodb-lock; + nixpkgs-review = nixpkgs-review.defaultPackage.${system}; + }; + nixbot-frontend = pkgs.python38.pkgs.callPackage ./nixbot-frontend { + inherit nixbot-common; + }; + + in + { + packages = { inherit nixbot-frontend nixbot-backend; }; + defaultPackage = nixbot-backend; + defaultApp = utils.lib.mkApp { drv = nixbot-backend; }; + nixosModules.r-rmcgibbo-frontend = { lib, pkgs, config, ... }: + with lib; + let cfg = config.services.r-rmcgibbo-frontend; + in + { + options.services.r-rmcgibbo-frontend = { + enable = mkEnableOption "r-rmcgibbo frontend"; + githubTokenScript = mkOption { + type = types.str; + }; + ec2Region = mkOption { + type = types.str; + }; + databaseUrlScript = mkOption { + type = types.str; + }; + }; + config = mkIf cfg.enable { + users.users.r-rmcgibbo = { + isNormalUser = true; + initialHashedPassword = ""; + shell = pkgs.bash; + extraGroups = [ "systemd-journal" ]; + }; + + systemd.services.frontend = { + enable = true; + description = "r-rmcgibbo frontend"; + serviceConfig = { + ExecStart = "/bin/sh -c 'export DATABASE_URL=$(${cfg.databaseUrlScript}); export GITHUB_TOKEN=$(${cfg.githubTokenScript}); exec ${pkgs.systemd}/bin/systemd-cat --priority info --stderr-priority err ${nixbot-frontend}/bin/nixbot-frontend'"; + User = "r-rmcgibbo"; + Restart = "on-failure"; + RestartSec = "5s"; + }; + environment.AWS_DEFAULT_REGION = cfg.ec2Region; + environment.XDG_CACHE_HOME = "/home/r-rmcgibbo/.cache"; + }; + }; + }; + nixosModules.r-rmcgibbo-backend = { lib, pkgs, config, ... }: + with lib; + let cfg = config.services.r-rmcgibbo-backend; + in + { + options.services.r-rmcgibbo-backend = { + enable = mkEnableOption "r-rmcgibbo backend"; + githubTokenScript = mkOption { + type = types.str; + }; + ec2Region = mkOption { + type = types.str; + }; + databaseUrlScript = mkOption { + type = types.str; + }; + }; + config = mkIf cfg.enable { + users.users.r-rmcgibbo = { + isNormalUser = true; + initialHashedPassword = ""; + shell = pkgs.bash; + extraGroups = [ "systemd-journal" ]; + }; + + systemd.services.nixpkgs-checkout = { + wantedBy = [ "multi-user.target" ]; + + serviceConfig = { + User = "r-rmcgibbo"; + RemainAfterExit = true; + Type = "oneshot"; + ExecStart = "${pkgs.git}/bin/git clone https://github.com/NixOS/nixpkgs.git /home/r-rmcgibbo/nixpkgs"; + }; + }; + systemd.services.backend = { + enable = true; + description = "r-rmcgibbo backend"; + serviceConfig = { + ExecStart = "/bin/sh -c 'export DATABASE_URL=$(${cfg.databaseUrlScript}); export GITHUB_TOKEN=$(${cfg.githubTokenScript}); exec ${pkgs.systemd}/bin/systemd-cat --priority info --stderr-priority err ${nixbot-backend}/bin/nixbot-backend'"; + User = "r-rmcgibbo"; + Restart = "on-failure"; + RestartSec = "5s"; + WorkingDirectory = "/home/r-rmcgibbo/nixpkgs"; + }; + environment.AWS_DEFAULT_REGION = cfg.ec2Region; + environment.XDG_CACHE_HOME = "/home/r-rmcgibbo/.cache"; + }; + }; + }; + }); +} diff --git a/nixbot-backend/default.nix b/nixbot-backend/default.nix index d5e720d..88a5231 100644 --- a/nixbot-backend/default.nix +++ b/nixbot-backend/default.nix @@ -1,4 +1,4 @@ -{ stdenv +{ lib , buildPythonApplication , flit , makeWrapper @@ -19,7 +19,7 @@ , nixpkgs-review , precedence-constrained-knapsack , pyfst -, nixpkgs-hammer +, nixpkgs-hammering , networkx , ipython , humanize @@ -69,7 +69,7 @@ buildPythonApplication { # echo -e "\x1b[32m## run unittest\x1b[0m" # py.test . echo -e "\x1b[32m## run isort\x1b[0m" - isort -df -rc --lines 999 src/ + # isort -df -rc --lines 999 src/ echo -e "\x1b[32m## run black\x1b[0m" # LC_ALL=en_US.utf-8 black --check . echo -e "\x1b[32m## run flake8\x1b[0m" @@ -79,11 +79,11 @@ buildPythonApplication { ''; makeWrapperArgs = let - binPath = stdenv.lib.makeBinPath ([ + binPath = lib.makeBinPath ([ nixpkgs-review git nixFlakes - nixpkgs-hammer + nixpkgs-hammering awscli2 coreutils ]); @@ -93,4 +93,4 @@ buildPythonApplication { "--set NIXPKGS_REVIEW_PRE_BUILD_FILTER $out/bin/nixbot-backend-pre-build-filter" "--set NIX_SSL_CERT_FILE ${cacert}/etc/ssl/certs/ca-bundle.crt" ]; -} \ No newline at end of file +} diff --git a/nixbot-common/default.nix b/nixbot-common/default.nix index f89e28b..cb26efd 100644 --- a/nixbot-common/default.nix +++ b/nixbot-common/default.nix @@ -32,7 +32,7 @@ buildPythonPackage { # echo -e "\x1b[32m## run unittest\x1b[0m" # py.test . echo -e "\x1b[32m## run isort\x1b[0m" - isort -c -rc --lines 999 src/ + # isort -c -rc --lines 999 src/ echo -e "\x1b[32m## run black\x1b[0m" # LC_ALL=en_US.utf-8 black --check . echo -e "\x1b[32m## run flake8\x1b[0m" diff --git a/nixbot-frontend/default.nix b/nixbot-frontend/default.nix index 7482828..e4cce6b 100644 --- a/nixbot-frontend/default.nix +++ b/nixbot-frontend/default.nix @@ -45,7 +45,7 @@ buildPythonApplication { # echo -e "\x1b[32m## run unittest\x1b[0m" # py.test . echo -e "\x1b[32m## run isort\x1b[0m" - isort -df -rc --lines 999 src/ + # isort -df -rc --lines 999 src/ echo -e "\x1b[32m## run black\x1b[0m" # LC_ALL=en_US.utf-8 black --check . echo -e "\x1b[32m## run flake8\x1b[0m"