changes before turning into a flake

This commit is contained in:
2024-10-31 23:43:37 -06:00
parent cf627acdb0
commit bd50a7ce71
77 changed files with 252 additions and 131 deletions

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
dir="$(realpath $(dirname ${BASH_SOURCE[0]})/../..)"
_nix_direnv_force_reload=1 direnv exec "$dir" true
direnv reload
# direnv reload updates the mtime of .envrc. Also update the timestamp of the
# profile_rc file to keep track that we actually are up to date.
touch $dir/.direnv/{nix,flake}-profile-*.rc

View File

@@ -0,0 +1 @@
/nix/store/0gylbw8l57rajj2zpl8dm9mi5sq0lp93-download-hs-0.1.0.0-env

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
use nix

View File

@@ -0,0 +1,5 @@
# Revision history for download-hs
## 0.1.0.0 -- YYYY-mm-dd
* First version. Released on an unsuspecting world.

View File

@@ -0,0 +1,20 @@
Copyright (c) 2024 Danilo Reyes
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,18 @@
module Main where
-- import Text.RE
-- Read a file line by line
readLines :: FilePath -> IO [String]
readLines = fmap lines . readFile
-- Example usage
main :: IO ()
main = do
let filePath = "./app/test.txt"
linesOfFile <- readLines filePath
mapM_ watchedURLS linesOfFile
watchedURLS :: String -> IO ()
watchedURLS line = do
putStrLn $ "Processing line: " ++ line

2294
non-nix/download_hs/app/test.txt Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,12 @@
let pkgs = import <nixpkgs> { };
in pkgs.haskellPackages.developPackage {
root = ./.;
modifier = drv:
pkgs.haskell.lib.addBuildTools drv (with pkgs.haskellPackages; [
cabal-install
ghcid
haskell-language-server
fourmolu
regex
]);
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1 @@
{"cabal-version":"3.10.2.1","cabal-lib-version":"3.10.2.1","compiler-id":"ghc-9.4.8","os":"linux","arch":"x86_64","install-plan":[{"type":"pre-existing","id":"base-4.17.2.1","pkg-name":"base","pkg-version":"4.17.2.1","depends":["ghc-bignum-1.3","ghc-prim-0.9.1","rts"]},{"type":"configured","id":"download-hs-0.1.0.0-inplace-download-hs","pkg-name":"download-hs","pkg-version":"0.1.0.0","flags":{},"style":"local","pkg-src":{"type":"local","path":"/home/jawz/Development/NixOS/scripts/download_hs/."},"dist-dir":"/home/jawz/Development/NixOS/scripts/download_hs/dist-newstyle/build/x86_64-linux/ghc-9.4.8/download-hs-0.1.0.0/x/download-hs","build-info":"/home/jawz/Development/NixOS/scripts/download_hs/dist-newstyle/build/x86_64-linux/ghc-9.4.8/download-hs-0.1.0.0/x/download-hs/build-info.json","depends":["base-4.17.2.1"],"exe-depends":[],"component-name":"exe:download-hs","bin-file":"/home/jawz/Development/NixOS/scripts/download_hs/dist-newstyle/build/x86_64-linux/ghc-9.4.8/download-hs-0.1.0.0/x/download-hs/build/download-hs/download-hs"},{"type":"pre-existing","id":"ghc-bignum-1.3","pkg-name":"ghc-bignum","pkg-version":"1.3","depends":["ghc-prim-0.9.1"]},{"type":"pre-existing","id":"ghc-prim-0.9.1","pkg-name":"ghc-prim","pkg-version":"0.9.1","depends":["rts"]},{"type":"pre-existing","id":"rts","pkg-name":"rts","pkg-version":"1.0.2","depends":[]}]}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,77 @@
cabal-version: 3.0
-- The cabal-version field refers to the version of the .cabal specification,
-- and can be different from the cabal-install (the tool) version and the
-- Cabal (the library) version you are using. As such, the Cabal (the library)
-- version used must be equal or greater than the version stated in this field.
-- Starting from the specification version 2.2, the cabal-version field must be
-- the first thing in the cabal file.
-- Initial package description 'download-hs' generated by
-- 'cabal init'. For further documentation, see:
-- http://haskell.org/cabal/users-guide/
--
-- The name of the package.
name: download-hs
-- The package version.
-- See the Haskell package versioning policy (PVP) for standards
-- guiding when and how versions should be incremented.
-- https://pvp.haskell.org
-- PVP summary: +-+------- breaking API changes
-- | | +----- non-breaking API additions
-- | | | +--- code changes with no API change
version: 0.1.0.0
-- A short (one-line) description of the package.
-- synopsis:
-- A longer description of the package.
-- description:
-- The license under which the package is released.
license: MIT
-- The file containing the license text.
license-file: LICENSE
-- The package author(s).
author: Danilo Reyes
-- An email address to which users can send suggestions, bug reports, and patches.
maintainer: CaptainJawZ@outlook.com
-- A copyright notice.
-- copyright:
category: Web
build-type: Simple
-- Extra doc files to be distributed with the package, such as a CHANGELOG or a README.
extra-doc-files: CHANGELOG.md
-- Extra source files to be distributed with the package, such as examples, or a tutorial module.
-- extra-source-files:
common warnings
ghc-options: -Wall
executable download-hs
-- Import common warning flags.
import: warnings
-- .hs or .lhs file containing the Main module.
main-is: Main.hs
-- Modules included in this executable, other than Main.
-- other-modules:
-- LANGUAGE extensions used by modules in this package.
-- other-extensions:
-- Other library packages from which modules are imported.
build-depends: base ^>=4.17.2.1
-- Directories containing source files.
hs-source-dirs: app
-- Base language which the package is written in.
default-language: Haskell2010